Html&CSS Button Blackground-Colors Style Code
<!DOCTYPE html>>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="nav.css">
<title>CSS Button colors</title>
</head>
<body>
<h1>CSS BUTTON COLORS</h1>
<p>Change the background color of a button with the background-color property:</p>
<button class="button">Green</button>
<button class="button button2">Blue</button>
<button class="button button3">red</button>
<button class="button button4">Gray</button>
<button class="button button5">Black</button>
</body>
</html>
CSS BLACKGROUND-COLORS STYLE
.button{
background-color: #4cac50;
border: none;
color: #fff;
padding:15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size:16px;
margin:4px 2px;
cursor: pointer;
}
.button2{
background-color: blue;
}
.button3{
background-color: red;
}
.button4{
background-color: gray;
}
.button5{
background-color: black;
}
No comments:
Post a Comment