mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
style: fix image caption style to avoid mess up after export
Use span instead of div to wrap the image caption.
This commit is contained in:
parent
61925a9c30
commit
6455e9ca19
@ -875,10 +875,10 @@ var insertImageCaption = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add caption.
|
// Add caption.
|
||||||
var captionDiv = document.createElement('div');
|
var captionSpan = document.createElement('span');
|
||||||
captionDiv.classList.add(VImageCaptionClass);
|
captionSpan.classList.add(VImageCaptionClass);
|
||||||
captionDiv.textContent = img.alt;
|
captionSpan.textContent = img.alt;
|
||||||
img.insertAdjacentElement('afterend', captionDiv);
|
img.insertAdjacentElement('afterend', captionSpan);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ img.img-center {
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.img-caption {
|
span.img-caption {
|
||||||
min-width: 20%;
|
min-width: 20%;
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -206,7 +206,7 @@ img.img-center {
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.img-caption {
|
span.img-caption {
|
||||||
min-width: 20%;
|
min-width: 20%;
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -200,7 +200,7 @@ img.img-center {
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.img-caption {
|
span.img-caption {
|
||||||
min-width: 20%;
|
min-width: 20%;
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -202,7 +202,7 @@ img.img-center {
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.img-caption {
|
span.img-caption {
|
||||||
min-width: 20%;
|
min-width: 20%;
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user