<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />
<title>CSS Tooltips</title>
<style type="text/css">
<!--
/* pretty stuff
================================== */
body {
font-family: "Myriad Pro", Frutiger, "Lucida Grande", "Lucida Sans", "Lucida Sans Unicode", Verdana, sans-serif
line-height: 1.2
}
/* css tooltip
================================== */
a.tooltip {
position: relative
}
a.tooltip span {
display: none
}
a.tooltip:hover {
font-size: 100%/* Fixes bug in IE5.x/Win */
}
a.tooltip:hover span {
display:block
position:absolute
top:1em
left:2em
padding: 0.2em 0.6em
border:1px solid #996633
background-color:#FFFF66
color:#000
}
-->
</style>
</head>
<body>
<p><a href="#" class="tooltip">Andy Budd<span>(This website rocks) </span></a>is a web developer based in Brighton England.</p>
</body>
</html>
CSS代替JS写的东西 很有意思
overflow这个属性就是可以让容器里(块元素)的内容即使超出容器也会给它一个滚动的定义,一般最常用的属性就是 overflow:hidden;因为这个属性可以让元素能够包容浮动的块元素,也就是有float属性的元素。现在用float做的网页越来越多了,float也被引申出各种各样的用法,但其实页面布局只要达到效果了就是最好,至于有趣嘛,钻进去了就是有趣。