我使用下面的代码来查看产品id。对每个列表使用背景图像。我想把图像和文字带回前台。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.addcart
{
}
.addcart ul{
list-style:none;
}
.addcart li{
list-style:none;
background-image:url(round.png);
background-repeat: no-repeat;
height:45px;
top:0px;
}
.addcart h3
{
font-size:24px;
font-weight:bold;
padding:10px 0px 40px 10px;
color:#F00;
z-index:400px;
position:relative;
}
</style>
</head>
<body>
<ul class="addcart">
<li><span><h3>96</h3></span></li>
<li><h3>97</h3></li>
</ul>
</body>
</html>
发布于 2013-02-06 14:11:39
如果您只想隐藏文本,请执行以下操作:
.addcart h3 {
position : absolute;
left : -9999px;
}
演示:http://jsfiddle.net/PFMHr/
发布于 2013-02-06 14:12:48
你想让文本返回吗?我建议你把它藏起来,用
display:none;
如果这对你的工作来说不是一个可行的解决方案,你能详细说明一下功能吗?
发布于 2013-02-06 14:11:32
你可以在.addcart li上加上吗?
`text-indent:-9999em;`
https://stackoverflow.com/questions/14722659
复制相似问题