以下為引用的內容: <style> div.bg{background:#ffc20e;width:50%} b{display:block;} /*將所有B標簽轉成塊級元素*/ div b.topb b,div b.bottomb b{height:1px;overflow:hidden;background:#ffc20e;} /*div標簽內類名為topb/bottomb的那個b標簽的css屬性值--高為1px,溢出部份隱藏,背景色同div.bg的背景色*/ div b.topb,div b.bottomb{ background-color:white} /*div標簽內類名為topb/bottomb的背景色要與body背景色一致*/ b.t1{margin:0 5px} /*標簽margin值將決定溢出的多少值被隱藏*/ b.t2{margin:0 3px} b.t3{margin:0 2px} b.t4{margin:0 1px;height:2px;} </style> <div align="center"> <div class="bg"> <b class="topb"><!--**此b標簽所包含的b標簽要進行溢出隱藏**--> <b class="t1"></b> <b class="t2"></b> <b class="t3"></b> <b class="t4"></b> </b> <br /> 這個代碼是從互聯網收集整理所得, 謝謝支持! <br /> <br /> <b class="bottomb"> <b class="t4"></b> <b class="t3"></b> <b class="t2"></b> <b class="t1"></b> </b> </div> </div> |