top

Posts tagged with css

Lightbox and Hoverbox

早就发现Lokesh Dhakarlightbox的效果很酷,今天又发现另一个国外达人NathanHoverbox,纯CSS的技巧,酷。

把两个东西简单结合一下,其实花不了什么技巧,不过东西更酷了一点。

Lightbox and Hoverbox: 看效果演示 | 下载 (338kb)

Nathan向我们解释了Hoverbox的实现:

The magic happens on a:hover, when .preview in the link goes from having display: none; to display: block; with absolute positioning and negative values for top and left. In good browsers, it is positioned according to the containing li, which is set to display: relative, but in Internet Explorer 6, a series of * html hacks place the positioning on the containing a href.

h1h2h3h4h5h6标签的使用

最近渐渐的开始使用“标题标签”,其实这个标准的HTML标签是很酷的。

以前你这样定义你的blog名称

<div class="title">fireyy blog</div>

然后写css样式

.title {
font-size:20px;
font-weight:bold;
}

这种方式其实很不直观,(有虚荣心的人总是想让搜索机器人很简单的认出你的代码 :))

你可以尝试使用h1

<h1>fireyy blog</h1>

然后写css样式

h1 {
font-size:20px;
font-weight:bold;
margin:0px; /*h1-h6默认有空白,设定外补丁的值为零,以便自己细调。*/
}

另外你可以看看H1-H6和其他尺寸的对照表

← Previous  1 2 3 4