价格中间有条线,就是这个价格作废,启用新的价格,这个用css样式怎么写???求指教!!!

html-css019

价格中间有条线,就是这个价格作废,启用新的价格,这个用css样式怎么写???求指教!!!,第1张

中间那条线叫做删除线,使用css的text-decoration:line-through就可以设置删除线,实例如下:

<span style=" text-decoration:line-throughcolor:red">199元</span><br />

<span style="font-weight:boldcolor:green">现价:99元</span>

<style type="text/css">

body {

font-size:18px

}

small {font-size:14px}

-->

</style>

<body>

99<small>.23</small>

</body>

用 display:inline-block就可以了,如果你不想用 float 的话。

.current{display:inline-blockwidth:XXpxheight:XXpxbackground:url(img.jpg) no-repeat}

不过在IE6上,虽然能设置宽,高,但响应鼠标指针的焦点有问题,所以建议用 padding 设置。

.current{padding:6px 10pxbackground:url(img.jpg) no-repeat}

这个就不用设置宽,高了,因为用了 padding 把 .current 的区域扩大了,至于具体数据,你自己按你图片大小进行调整就好了。