Hello there, I am welcome back with a new article π on Phone Model Layout; This is will be the fun article.
So let's get started π
Quick look
- In
index.html
<div class="container">
<div class="content">
<iframe src="https://snowbit.vercel.app" style="width:100%;border:none;height:100%" />
</div>
</div>
- In
style.css
.container {
position: relative;
width: 360px;
height: 640px;
margin: auto;
border: 16px rgb(75, 75, 75) solid;
border-top-width: 60px;
border-bottom-width: 60px;
border-radius: 36px;
}
.container:before {
content: '';
display: block;
width: 60px;
height: 5px;
position: absolute;
top: -30px;
left: 50%;
transform: translate(-50%, -50%);
background: #333;
border-radius: 10px;
}
.container:after {
content: '';
display: block;
width: 35px;
height: 35px;
position: absolute;
left: 50%;
bottom: -65px;
transform: translate(-50%, -50%);
background: #333;
border-radius: 50%;
}
.container .content {
width: 360px;
height: 640px;
background: white;
}
This was it, so simple and easy π
Live Demo - https://snowbit-coderboi.github.io/Phone-View-Layout/
Source Code - https://github.com/snowbit-coderboi/Phone-View-Layout
I hope you liked this post; And make sure to share the feedback π in comment sections
Top comments (0)