在DW中如何用CSS使链接文字变大并在前面加一个小点?

html-css017

在DW中如何用CSS使链接文字变大并在前面加一个小点?,第1张

在DW中用CSS使链接文字变大并在前面加一个小点,我们可以使用ul、li来包裹着这个a然后在设置超链接的文字变大,通过font-size这个属性就行,不要去除掉ul、li的默认属性,默认就会有点的,具体看代码:

<html>

<head>

<style>

#div1{

width:600px

height:40px

font-size:13px

}

#div1 a{

font-size:15px

}

</head>

<body>

<div id='div1'>

<ul>

<li><a href=''>测试1</a></li>

<li><a href=''>测试2</a></li>

</ul>

</div>

</body>

</html>

.news a:link{ color:#000text-decoration: nonefont-size:12px }

.news a:visited {text-decoration: nonecolor:#000}

.news a:hover {color:#F00

.news a:active {text-decoration: nonecolor:#000}

其中第一行的link中font-size:12px就是字体的大小。这样你在要使用的地方调用class="news"就可以了,如果你想所有的连接都统一样式,那好办,把上面的.news去掉,

a:link{ color:#000text-decoration: nonefont-size:12px }

a:visited {text-decoration: nonecolor:#000}

a:hover {color:#F00

a:active {text-decoration: nonecolor:#000}

完整的代码是

<style type="text/css">

a:link{ color:#000text-decoration: nonefont-size:12px }

a:visited {text-decoration: nonecolor:#000}

a:hover {color:#F00

a:active {text-decoration: nonecolor:#000}

</style>

放在<head></head>标签之间

鼠标掠过 和 链接过不一样

a:link {

text-decoration: nonecolor: #000000

}

a:visited {

text-decoration: nonecolor: #000000

}

a:hover {

text-decoration: nonecolor: #000000

}

a:active {

text-decoration: nonecolor: #000000

}

这几个各不一样 第一个link是指默认的情况下现实的字体

第二个visited 是指被访问过后的字体

第三个hover 是鼠标放在字上的字体

第四个active 是鼠标按住在字上是显示的字体

使用图片的话你要另外给图片的链接加 style=“width:0pxheight:0px”啊

要么你参考这个

w3school.com.cn》htmldom》event_onmouseover.asp 把》改成 / 是参考的网址