Basic Website Dezine
EXERCISE ON CSS
EXERCISE V
HTML Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700&family=Open+Sans:wght@300&family=Poppins:wght@300&display=swap');
* {
padding: 0;
margin: 0;
}
:root {
--bodyback: #cbccd5;
--navback: #040468;
--spncol: white;
--undercol: red;
}
body {
background-color: var(--bodyback);
}
header {
position: sticky;
top: 0px;
}
nav {
margin-bottom: 20px;
display: block;
padding: 88px;
background-color: var(--navback);
}
nav>span {
padding: 58px;
font-size: x-large;
font-weight: bold;
font-family: 'Merriweather', serif;
font-family: 'Open Sans', sans-serif;
font-family: 'Poppins', sans-serif;
color: var(--spncol);
}
nav>span:hover {
text-decoration: underline 3px;
text-decoration-color: var(--undercol);
text-underline-offset: 10px;
cursor: pointer;
/* font-size: xx-large;
font-weight: bolder; */
}
</style>
<style>
.mainbox {
display: flex;
justify-content: center;
margin: 10px;
background-color: green;
padding: 100px 0px 100px 0px;
}
.box {
width: 800px;
height: 1000px;
border: 2px solid black;
margin-right: 50px;
margin-left: 50px;
}
.red {
background-color: red;
}
.yellow {
background-color: yellow;
}
.mybox {
display: flex;
justify-content: center;
align-items: center;
}
p {
display: flex;
justify-content: center;
color: white;
font-size: xx-large;
}
.yobox {
background-color: gray;
display: flex;
justify-content: center;
align-items: center;
border: 2px solid black;
border-radius: 20px;
width: 80vw;
height: 20vh;
margin: 50px 0 60px 0;
}
footer>div {
border: 2px solid black;
width: 100vw;
height: 20vh;
background-color: white;
}
img {
position: fixed;
bottom: 10px;
right: 10px;
width: 5vw;
/* border-radius: 100px; */
opacity: 70%;
clip-path: circle();
}
</style>
<body>
<header>
<nav>
<span>Home</span>
<span>About</span>
<span>Cources</span>
<span>Contacts</span>
</nav>
</header>
<div class="mainbox">
<div class="box red">
</div>
<div class="box yellow">
</div>
</div>
<div class="mybox">
<div class="yobox">
<p>
Wlecome to Aditya Kashyaps website!
</p>
</div>
</div>
<footer>
<div class="end">
</div>
</footer>
<img src="wp8232058-creative-4k-wallpapers.jpg" alt="icon">
</body>
</html>
Comments
Post a Comment