I am trying to make my <hr />
(hr) element pi开发者_JAVA技巧nkish, and am using the following css rule for this:
hr {height: 1px; color: #ed1d61;background-color: #ed1d61;
}
But there is still a black line showing through it.
(here is a look at it on the site that I am making: http://www.yemon.org/ , its the only horizontal line in the design.
How do i get the line uniform pink?
Change it to this:
hr {
height: 1px;
color: #ed1d61;
background: #ed1d61;
font-size: 0;
border: 0;
}
Looking at your page, I think this would look best:
hr {height: 2px;
background-color: #ed1d61;
border:none
}
A demo is here.
Try setting the border color property: border-color:#ed1d61;
The hr element is made of border so a simple border:none and you'll get rid of the excess.
Then you simply have to play on your height to make it as thick as you'd like.
Try this:
.hr {
border: 0;
height: 1px;
background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.15), rgba(0,0,0,0));
background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.15), rgba(0,0,0,0));
background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.15), rgba(0,0,0,0));
background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.15), rgba(0,0,0,0));
margin: 25px;
}
hr{
background-color: #ed1d61;
border-width: 0;
/*change your size in this place*/
padding-top: 1px;
}
<hr/>
sadf
精彩评论