-1
Use properties of display: flex
for vertical and horizontal alignment of the number, background
degrade, box-shadow
to create a shadow and border-radius: 50%
to create a circle:
ul, li{
margin: 0; padding: 0;
list-style: none;
}
ul.circulo li, div.circulo{
display: flex;
align-items: center;
justify-content: center;
width: 45px;
height: 45px;
border-radius: 50%;
float: left;
margin: 4px;
font-size: 30px;
font-weight: bold;
color: #555;
background: -moz-linear-gradient(270deg, #f5f5f5 0%, #f5f5f5 16%, #999999 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f5f5f5), color-stop(16%, #f5f5f5), color-stop(100%, #999999));
background: -webkit-linear-gradient(270deg, #f5f5f5 0%, #f5f5f5 16%, #999999 100%);
background: -o-linear-gradient(270deg, #f5f5f5 0%, #f5f5f5 16%, #999999 100%);
background: -ms-linear-gradient(270deg, #f5f5f5 0%, #f5f5f5 16%, #999999 100%);
background: linear-gradient(180deg, #f5f5f5 0%, #f5f5f5 16%, #999999 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#999999',GradientType=0 );
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#999999',GradientType=0 );
-webkit-box-shadow: 2px 2px 2px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 2px 2px 2px 0px rgba(50, 50, 50, 0.75);
box-shadow: 2px 2px 2px 0px rgba(50, 50, 50, 0.75);
}
<h2>Com LI:</h2>
<br />
<ul class="circulo">
<li>01</li>
<li>02</li>
<li>03</li>
<li>04</li>
<li>05</li>
</ul>
<br clear="all" /><br />
<h2>Com DIV:</h2>
<br />
<div class="circulo">01</div>
<div class="circulo">02</div>
<div class="circulo">03</div>
<div class="circulo">04</div>
<div class="circulo">05</div>
With divs
:
New Trick: display:flex, did not know this! nice solution
– AnthraxisBR
That’s right! Only one problem, ended up modifying all the lists on the blog. How to change only when using this class? I think this is the problem: ul, li{ margin: 0; padding: 0; list-style: None; }
– Neto Oliveira
@Netooliveira E ae, blz? It’s just an example. You can take advantage of the code to do as you please, with Divs, for example. :)
– Sam
How would I look with DIVS?
– Neto Oliveira
@Netooliveira I included in the answer with LI and DIV.
– Sam
Damn life, it worked out! THANK YOU VERY MUCH friend! :)
– Neto Oliveira
@Netooliveira Be sure to mark the question to help other people. Abs!
– Sam