我遇到了一个小谜题:
当图片位于70% width
.<我环顾四周,似乎没有找到答案<我试着让img绝对定位right:0 left:0
, 但我无法清除它,下一段将在下面进行,因为您无法像清除浮动元素那样清除绝对定位的元素<我不排除JS解决方案,但不管它是什么,我都不需要什么指导,因为我现在很迷茫。
如何在70%(文本)的段落内制作全宽图像
1 个回复
最合适的回答,由SO网友:Marcos Di Paolo 整理而成
已解决,JS with jQuery width(),removeAttr()以避免wordpress内联宽度和高度。还有负利润。
var anchoArticulo = $(\'article.single-post\').width();
$(\'article.single-post div.single-post img.ancho_completo\')
.removeAttr(\'width height\')
.css(\'margin-left\' , -(winWidth - anchoArticulo)/2)
.css(\'width\' , winWidth);
类别ancho_completo
在仪表板中添加到图像中。结束