HTML + CSS短標題(二,三,四文字長度)兩端對齊的方式
- <style type="text/css">
- .hotsearch dd{
- float: left;
- line-height: 24px;
- margin-right: 30px;
- overflow: hidden;
- text-align: center;
- width: 4em;
- }
- .hotsearch dd a{
- display:block;
- }
- .w2{
- letter-spacing:2em;
- margin-right:-2em;
- }
- .w3{
- letter-spacing:0.5em;
- margin-right:-0.5em;
- }
- </style>
- <span style="font-size:12px;"><dl class="hotsearch" style="width:300px;">
- <dt>熱門搜索</dt>
- <dd><a href="#" target="_blank" ref="nav" class="w3">電視機</a></dd>
- <dd><a href="#" target="_blank" ref="nav" class="w4">性感漂亮</a></dd>
- <dd><a href="#" target="_blank" ref="nav" class="w3">高跟鞋</a></dd>
- <dd><a href="#" target="_blank" ref="nav" class="w2">手機</a></dd>
- <dd><a href="#" target="_blank" ref="nav" class="w2">對齊</a></dd>
- <dd><a href="#" target="_blank" ref="nav" class="w3">牛仔褲</a></dd>
- <dd><a href="#" target="_blank" ref="nav" class="w4">小家碧玉</a></dd>
- <dd><a href="#" target="_blank" ref="nav" class="w2">家居</a></dd>
- </dl></span>
歡迎關注本站公眾號,獲取更多信息