怎麼可能做到這一點,兼容,良好的前瞻性和反應?我想用H2背景製作H2盒子,但是它會讓很多問題與背景相互作用......這是很多png。我喜歡的方式與純CSS,填充,保證金等做
full resolution image (too see texture)
怎麼可能做到這一點,兼容,良好的前瞻性和反應?我想用H2背景製作H2盒子,但是它會讓很多問題與背景相互作用......這是很多png。我喜歡的方式與純CSS,填充,保證金等做
full resolution image (too see texture)
This ca n可以用你選擇的任何語義上合適的元素來完成,而不必設置背景顏色。
http://cssdeck.com/labs/n2z0icvf
<h1>Technique</h1>
h1 {
overflow: hidden;
padding-left: 2em;
}
h1:before,
h1:after {
content: " ";
display: inline-block;
border-bottom: 2px solid;
position: relative;
vertical-align: middle;
width: 50%;
}
h1:before {
right: 0.5em;
margin-left: -50%;
}
h1:after {
left: 0.5em;
margin-right: -50%;
width: 100%;
}
工作小提琴:http://jsfiddle.net/58JCY/
HTML:
<fieldset>
<legend>LEVE TECHNIQUE</legend>
</fieldset>
CSS:
fieldset {
border:none;
border-top: 1px solid #999;
}
legend {
padding: 0 5px;
}
http://css-tricks.com/line-on-sides-headers/ – cimmanon 2013-05-06 16:16:56
克里斯Coyier,那傢伙ROCK! – menardmam 2013-05-06 16:28:00