gpt4 book ai didi

html - 如何编写覆盖主题 CSS 的插件 CSS

转载 作者:太空宇宙 更新时间:2023-11-04 15:52:00 24 4
gpt4 key购买 nike

我为我的插件写了 CSS,但是主题 CSS 覆盖了它,我已经尝试并搜索了这个我没有得到任何解决方案

这是我的 HTML 代码

 <html>
<body>
<img src="sample.gif" width="100" height="132">
<h1>This is also some text. This is also some text. This is also some text. This is also some text. This is also some text. This is also some text.</h1>
</body>
</html>

我的 CSS 是

 img {
float: right !important;
}

主题 CSS 是

  h1 {
clear:both;
}

我希望我的图片显示在 h1 标签的右侧。

最佳答案

简单地删除标题上的清除...如果那不可能,覆盖它

img {
float: right
}

h1 {
clear: both !important
}

body h1 {
clear: none !important
}
<img src="sample.gif" width="100" height="132">
<h1>This is also some text. This is also some text. This is also some text. This is also some text. This is also some text. This is also some text.</h1>

关于html - 如何编写覆盖主题 CSS 的插件 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49490816/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com