gpt4 book ai didi

html - 容器高度和宽度不变的标记图像

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

我有一个菜单列表:

<ul>
<li class="marked">First item</li>
<li>Second much longer than first item</li>
</ul>

我想在 item.marked 顶部有一个图像标记,width 将是文本宽度的 100%。图像必须拉伸(stretch)才能完全可见。 高度 是常量。

这可以通过 CSSIE 兼容性来完成吗?

最佳答案

 <style type="text/css">
.selected {
background:url("example.png") no-repeat 0 100%;
}
</style>

关于html - 容器高度和宽度不变的标记图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12018198/

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