you can easily use border-radius
property and make elements curved. (like the picture below). Just use the appropriate degree to make a circle or a curved rectangle.
HTML:
<div class="box"><p>My Box</p></div>
<div class="circle">
<p>Hello</p>
</div>
CSS:
body {
margin: 20px auto;
font-family: "Lato";
font-weight: 300;
padding: 20px;
}
.box {
border-radius: 4px;
background: red;
width: 200px;
height: 200px;
line-height: 50px;
text-align: center;
margin: 20px;
color: white;
font-size: 1.4rem;
float: left;
}
.circle {
background: red;
width: 200px;
height: 200px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 2rem;
font-weight: 600;
margin: 20px;
}
* you can use border-radius
with all html elements (for example images)
* use border-radius=50%
to make a circle
- نفیسه افقی 2 سال قبل پاسخ داد
- آخرین ویرایش 2 سال قبل
- شما باید برای ارسال دیدگاه وارد شوید