CSS Button Style
Example: 1
<html>
<head>
<style>
</head>
<body>
<div align="center">
<h2>CSS Button</h2>
</body>
</html>
<head>
<style>
.button
{
border: 1px inset #cccccc;
color: #ffffff;
background-color: #014db7;
font-family:Comic Sans MS;
font-size: 15px;
font-weight: bold;
text-decoration: none;
}
</style>{
border: 1px inset #cccccc;
color: #ffffff;
background-color: #014db7;
font-family:Comic Sans MS;
font-size: 15px;
font-weight: bold;
text-decoration: none;
}
</head>
<body>
<div align="center">
<h2>CSS Button</h2>
<a href="#" class="button">Home</a>
<a href="#" class="button">HTML</a>
<a href="#" class="button">Contact</a>
</div><a href="#" class="button">HTML</a>
<a href="#" class="button">Contact</a>
</body>
</html>
Output
If we add hover, it will be more clear to us.
Example: 2
<html>
<head>
<style>
.button
{
border: 1px inset #cccccc;
color: #ffffff;
background-color: #0066ff;
font-family:arial;
font-size: 20px;
font-weight: bold;
text-decoration: none;
}
</head>
<body>
<div align="center">
<h2>Sample CSS Button</h2>
</body>
</html>
<head>
<style>
.button
{
border: 1px inset #cccccc;
color: #ffffff;
background-color: #0066ff;
font-family:arial;
font-size: 20px;
font-weight: bold;
text-decoration: none;
}
a.button:link{
color: #ffffff;
}
a.button:visited{
color: #cccccc;
}
a.button:hover{
color: #66cc33;
border: 1px outset #00ff00;
}
</style>color: #ffffff;
}
a.button:visited{
color: #cccccc;
}
a.button:hover{
color: #66cc33;
border: 1px outset #00ff00;
}
</head>
<body>
<div align="center">
<h2>Sample CSS Button</h2>
<a href="index.htm" class="button">Home</a>
<a href="gallery.htm" class="button">Gallery</a>
<a href="contact.htm" class="button">Contact</a>
</div><a href="gallery.htm" class="button">Gallery</a>
<a href="contact.htm" class="button">Contact</a>
</body>
</html>
Output
No comments:
Post a Comment