css字体横着显示 高手帮忙修复

html-css06

css字体横着显示 高手帮忙修复,第1张

#tip前面加个a(a#tip),穿着裤子放屁,多此一举

你这个要直接a:hover span时设为block

<ul id="test">

<li><a href="#">移到这里<span>提示内容</span></a></li>

<ul>

#test a span{display:none}

#test a:hover span{display:block}

IE6下a:hover span是无效的,不过很好解决,你自行百度下ie6 a:hover span

使用DIV+css 实现文字横排居中 并且有间距,首先文字需要有个块级元素包裹着,然后设定一定的宽度和高度,文字居中,css中有个text-align这个属性,设置成center,文字就是相对容器的宽度是居中的,请看代码:

<html>

<head>

<style>

#div1{

width:600px

height:40px

font-size:13px

}

#div1 p{

display:block

width:300px

height:30px

text-align:center

margin:0 auto

}

</head>

<body>

<div id='div1'>

<p>我是测试文字</p>

</div>

</body>

</html>

CSS代码如下:

.div-inline{ display:inline}

Html代码片段:

<div class="div-inline">第一个div盒子</div><div class="div-inline">第二个盒子</div><div class="div-inline">第三个盒子</div>