100Days css #1

Screenshot 2024 09 10 140934
CSS
				
					
.frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  margin-top: -200px;
  margin-left: -200px;
  border-radius: 2px;
	box-shadow: 4px 8px 16px 0 rgba(0,0,0,0.1);
	overflow: hidden;
  background: linear-gradient(to top right, #7054d4 20%, #aaf007 80%);
  color: #333;
	font-family: "Courier New", "Courier", sans-serif;;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.center {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%,-50%);
}
.box{
	position: relative;
	width: 100px;
	height: 200px;
	margin: 120px 0 -60px 20px;
}
.one {
	position: absolute;
	top: 0;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 0 13px 0 rgba(0, 0, 0, 0.2);
}
.one-one {
	width: 20px;
	height: 40px;
	transform: rotate(0.14turn);
	z-index: 2;
	left: -16px;
}
.one-two {
	width: 24px;
	height: 100px;
	z-index: 8;
}

.zero {
	box-sizing: border-box;
	position: absolute;
	top: 0;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	border: 24px solid #fff;
	box-shadow: 0 0 13px 0 rgba(0, 0, 0, 0.2);
}
.zero-one {
	z-index: 4;
	left: 70px;
}
.zero-two {
	right: 0;
	z-index: 6;
}
span {
	display: block;
	text-transform: uppercase;
	color: #fff;
	font-weight: 700;
}
.middle {
	font-size: 5.2em;
	line-height: 72px;
}
.last {
	font-size: 1.55em;
	line-height: 18px;
	letter-spacing: 0.01em;
}
				
			
HTML
				
					<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <link rel="stylesheet" href="styles.css">
    </head>
<div class="frame">
	<div class="center">
		<div class="box">
			<div class="one one-one"></div>
			<div class="one one-two"></div>
			<div class="zero zero-one"></div>
			<div class="zero zero-two"></div>
		</div>
		<span class="middle">days </span>
		<span class="last">css challenge</span>
	</div>
</div>
</html>
				
			

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top