Html 如何用按钮画一条线的中心
我想在CSS中画一条Html 如何用按钮画一条线的中心,html,css,Html,Css,我想在CSS中画一条线。在中间有一个按钮,中间的那条线。那么如何在css中实现这种效果呢?将页边距底部减为按钮。这样写: button{ margin-bottom:-20px; position:relative; } CSS HTML .button-holder{display:block; height:30px; border-bottom:1px solid #ff0000; position:relative; text-align:center;} input{pos
线。在中间有一个按钮,中间的那条线。那么如何在css中实现这种效果呢?将页边距底部
减为按钮
。这样写:
button{
margin-bottom:-20px;
position:relative;
}
CSS
HTML
.button-holder{display:block; height:30px; border-bottom:1px solid #ff0000; position:relative; text-align:center;}
input{position:absolute; bottom:-13px;}
<div class="button-holder">
<input type="button" value="button in the middle of HR" />
</div>