>我在 vue2-editor 中使用 quiill-image-resize-module 在图像中实现了调整大小,但现在宽度属性已添加到 img 中,我想将其复制到样式属性。
在我所做的实现中,img 标签是宽度为 css:calc (100% + 32px(;
因为有翻译并且无法更正,所以我希望能够通过将大小与样式放在图像中来显示比指定大小更小或更大的内容。
在目前的情况下是这样的。
<img alt src="https://**********" width="100px">
我想这样改变它。
<img alt src="https://**********" style="width:100px">
尝试将样式标签移动到您的 css:
.img {
width: 100px !important;
}
或者如果您使用其他不应调整的 img 标签:
你的 css:
#yourChoosenId {
width: 100px !important;
}
您的网页:
<img alt src="https://**********" id="yourChoosenId">