hr通过css与图像 [英] hr with an image through css

查看:82
本文介绍了hr通过css与图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得这是一种痛苦。我试图让CSS使用图像时,< hr /> 标记。
我目前正在使用:

I find this a pain. I am trying to get CSS to use an image when the < hr /> tag is used. I am currently using:

hr
{
  display:block;
  border:none;
  height:10px;
  background-image:url('img/ruler.gif');
} 

但是,我总是在图像周围得到一个边框。如你所见, border:none 什么也不做。

However, I always get a border around the image. As you can see, the border:none does nothing.

我知道有其他方法, 。但是是可能通过使用hr标签吗?

I know there are alternative ways such as using div. But is it possible through using the hr tag only?

主要用户将使用IE6,因此需要一个IE6兼容的解决方案。
感谢

The main users will be using IE6, so need a IE6 compatable solution please. Thanks

推荐答案

这应该有帮助。


http://blog.neatlysliced.com/2008 / 03 / hr-image-replacement /

这篇关于hr通过css与图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆