如何设置hr标签的样式?
#footer hr
{
background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));
}
这在firefox中不起作用。我甚至试过了background:
,但那没用。还有其他方法可以使它工作吗?
答案 0 :(得分:2)
它的工作 你需要在你的css id页脚中使用div in div。如下所示
<div id="footer">
<hr />
</div>
答案 1 :(得分:1)
答案 2 :(得分:0)
您需要指定<hr />
看this
答案 3 :(得分:0)
好吧,你可以尝试制作这样的div:
CSS:
div.hr{
background-image:url('yourimage.jpg');
height: 5px;
width: 400px; /*About the size of the content area that you are putting it in*/
margin-left: auto;
margin-right: auto;
}
HTML:
<div id="hr">
</div>
有任何疑问吗?
编辑: 看看查理的答案,你可以尝试这样的事情:
<div id="footer">
<hr id="footer" />
</div>
#footer
{
height:10px;
background-color: black;
padding: 0px
}
答案 4 :(得分:0)
.myhr {
border: 0;
height: 1px;
background: #333;
background-image: -webkit-linear-gradient(left, #ccc, #333, #ccc);
background-image: -moz-linear-gradient(left, #ccc, #333, #ccc);
background-image: -ms-linear-gradient(left, #ccc, #333, #ccc);
background-image: -o-linear-gradient(left, #ccc, #333, #ccc);
}
答案 5 :(得分:0)
hrshadow {
height: 12px;
border: 0;
box-shadow: inset 0 12px 12px -12px rgba(0,0,0,0.5);
}
/****************************/
Newhr {
height: 30px;
border-style: solid;
border-color: black;
border-width: 1px 0 0 0;
border-radius: 20px;
}
Newhr:before {
display: block;
content: "";
height: 30px;
margin-top: -31px;
border-style: solid;
border-color: black;
border-width: 0 0 1px 0;
border-radius: 20px;
}
答案 6 :(得分:0)
.hrstyle {
padding: 0;
border: none;
border-top: medium double #333;
color: #333;
text-align: center;
}
.hrstyle:after {
content: "§";
display: inline-block;
position: relative;
top: -0.7em;
font-size: 1.5em;
padding: 0 0.25em;
background: white;
}
/****dashed line *****/
.dash_hr {
border: 0;
border-bottom: 1px dashed #ccc;
background: #999;
}