我刚开始编程,我想用html尝试CSS。然而,我仍然遇到像我想要一个按钮这样的错误,但是当显示在浏览器上时,所述按钮变成链接。 有人可以解释吗?使用一个带有链接的div的导航按钮
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Linking External Style Sheets</title>
<style>
h1 {
color: blue;
}
a {
color: blue;
text-decoration: none;
}
a:hover {
background-color: yellow;
}
</style>
</head>
<body>
<div><p><em>Click here:</em>
<a class="w3-btn" href="http://www.w3schools.com">Link Button</a>
</div>
</body>
</html>
我想给它一个边框,背景和文本颜色也,使之改变时,在它的代码那里有一个鼠标...
在一个单独的话题,这是怎么做到的外部样式表 –
放置一个css文件里面你的风格,然后将文件导入到你的HTML与'<链接相对=“样式的” href =“stylefile.css “>'。将此代码放置在html代码的'
'部分。 –