<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nth or pseudo</title>
</head>
<style>
.container{
border: 2px solid black;
width:50%;
display: block;
margin: auto;
background-color: black;
}
input{
display: block;
margin: auto;
}
.item{
display: block;
margin: 2px 250px;
}
input[type="text"]{
padding: 5px 5px;
border-radius: 10px;
margin: 5px auto;
color: red;
background: black;
}
input[type="Email"]{
padding: 5px 5px;
border-radius: 10px;
margin: 5px auto;
color: red;
background: black;
}
input[type="password"]{
padding: 5px 5px;
border-radius: 10px;
margin: 5px auto;
color: red;
background: black;
}
input[type="button"]{
border-radius: 10px;
margin: 8px auto;
padding: 5px 15px;
background-color:red;
font-size: 20px;
}
a[target="_blank"]{
display: block;
margin: 5px 250px;
font-size: 30px;
font-weight: bold;
color: red;
}
a[target="_post"]{
display: block;
}
/* .item:nth-child(4n+2){
color: blue;
text-decoration:underline ;
font-weight: bold;
} */
li:nth-child(odd){
color: crimson;
font-weight: bolder;
}
li:nth-child(even){
color: white;
font-weight: bolder;
}
input:hover{
cursor: pointer;
background-color: darkblue;
}
li:hover:nth-child(even){
cursor: pointer;
color: red;
}
li:hover:nth-child(odd){
cursor:pointer;
color:blue;
}
</style>
<body>
<div class="container">
<a href="http://Google.com" target="_blank">Go to the Google </a>
<form action="noaction.php" class="form-inp">
<input type="text" placeholder="Enter Your Name">
<input type="Email" placeholder="Enter Your Email">
<input type="password" placeholder="Enter Your password">
<input type="button" value="Submit">
</form>
<ul>
<li class="item" id="item1">Item1</li>
<li class="item" id="item2">Item2</li>
<li class="item" id="item3">Item3</li>
<li class="item" id="item4">Item4</li>
<li class="item" id="item5">Item5</li>
<li class="item" id="item6">Item6</li>
<li class="item" id="item7">Item7</li>
<li class="item" id="item8">Item8</li>
<li class="item" id="item9">Item9</li>
<li class="item" id="item10">Item10</li>
</ul>
</div>
</body>
</html>
No comments:
Post a Comment