CSS标签样式

html-css013

CSS标签样式,第1张

这样的样式通常都是两种处理方式:一个是利用背景图,一个是利用边框设置!

背景图设置:

background-image:url("")做一张渐变的背景就可以了

边框设置:

border-style:solid边框样式(实线)

border-width:0px 0px 1px 0px下边框1像素(上右下左的顺序设置)

border-color:red红色

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />

<title>A标签</title>

<style type="text/css">

*{ margin:0padding:0}

a{ color:#00Ctext-decoration:nonepadding:0 20px}/*整个页面A标签的属性*/

a:hover{ color:#F00text-decoration:underline}/*整个页面A标签鼠标滑过属性*/

.one,.two{ width:800pxmargin:20px autoline-height:36pxborder:1px solid green}

.two a{ color:#000}/*在.two这个div里面A标签的属性*/

.two a:hover{ color:#0F0}

</style>

</head>

<body>

<div class="one"><a href="#">百度</a><a href="#">新浪</a><a href="#">腾讯</a><a href="#">网易</a></div>

<div class="two"><a href="#">百度</a><a href="#">新浪</a><a href="#">腾讯</a><a href="#">网易</a></div>

</body>

</html>