Positions Using CSS
unknown
plain_text
a year ago
838 B
15
Indexable
<html>
<head>
<title>Position Property in CSS</title>
<style>
.container{
height:200px;
width:500px;
border-radius:50px;
margin-bottom:150px;
box-shadow: 15px 15px rgba(25,65,78, 0.3)
}
.red{
background-color: red;
/* position:fixed; */
}
.yellow{
background-color: yellow;
position:sticky;
top:0px;
}
.green{
background-color: green;
}
.black{
background-color: black;
}
</style>
</head>
<body>
<div class="container red"></div>
<div class="container yellow"></div>
<div class="container green"></div>
<div class="container black"></div>
</body>
</html>Editor is loading...
Leave a Comment