0
我正在学习自适应图片,我想在里面设计我的图片标签和图片。我试图使用.test1和.test2选择器,但他们都没有工作。那么是否有任何方式来设计它?谢谢。风格图片元素
UPD。例如,我想打一个红色边框aroung图像:https://jsfiddle.net/842L3f1x/
<picture class="test1">
<source class="test2" srcset="img/[email protected]" media="(max-width: 700px)">
<source srcset="img/[email protected]">
<img src="img/[email protected]" alt="Photo city">
</picture>
我能够在这个[小提琴](https://jsfiddle.net/undoingtech/d2r328un/)中应用样式。也许你应该发布一些你的CSS。 – UndoingTech
@UndoingTech感谢您的回答。好的,我想要图片的红色边框。这是我的。 https://jsfiddle.net/842L3f1x/ – th1rt3nth
请参阅我在本[小提琴]中的编辑(https://jsfiddle.net/undoingtech/842L3f1x/1/)。我完全脱掉了'.test2'样式,并将'display:inline-block;'添加到'.test1'中。那是你要的吗? – UndoingTech