Positions Using CSS
unknown
plain_text
17 days ago
838 B
4
Indexable
Never
<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>
Leave a Comment