<div class="porcentage">
<center><h4>Titulo</h4>
<hr>
<p>Proyecto de circulos progresivos con porcentajes usando html y css (responsive)</p>
<div class="container2">
<div class="card">
<div class="box">
<div class="percent">
<svg>
<circle cx="70" cy="70" r="70" />
<circle cx="70" cy="70" r="70" />
</svg>
<div class="number">
<h2>90<span>%</span></h2>
</div>
<h3>HTML</h3>
</div>
</div>
</div>
<div class="card">
<div class="box">
<div class="percent">
<svg>
<circle cx="70" cy="70" r="70" />
<circle cx="70" cy="70" r="70" />
</svg>
<div class="number">
<h2>40<span>%</span></h2>
</div>
<h3>CSS</h3>
</div>
</div>
</div>
<div class="card">
<div class="box">
<div class="percent">
<svg>
<circle cx="70" cy="70" r="70" />
<circle cx="70" cy="70" r="70"/>
</svg>
<div class="number">
<h2>1<span>%</span></h2>
</div>
<h3>JavaScript</h3>
</div>
</div>
</div>
</div>
</div>
.porcentage{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: white;
}
.porcentage h4{
font-size: 1.8rem;
font-family: inherit;
}
.porcentage hr{
margin-top: 0.5rem;
margin-bottom: 1rem;
border: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
width: 200px;
border: 2px solid black;
}
.container2 {
position: relative;
width: 960px;
display: flex;
justify-content: space-around;
}
.container2 .card {
position: relative;
width: 250px;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
height: 330px;
border-radius: 10px;
cursor: pointer;
text-align: center;
transition: 0.5s ;
margin-top: 23px;
}
.container2 .card:hover {
transform: translateY(-10px);
box-shadow: 0 15px 35px rgba(0, 0, 0, .5);
}
.container2 .card::before {
content: '';
position: absolute;
top: 0;
left: -50;
width: 100%;
height: 100%;
background: white;
pointer-events: none;
z-index: 1;
}
.percent{
position: relative;
width: 150px;
height: 150px;
border-radius: 50%;
box-shadow: inset 0 0 50px #ffffff;
background: rgb(255, 255, 255);
z-index: 1000;
}
.percent .number{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
}
.percent .number h2{
color: #000000;
font-weight: 700;
font-size: 40px;
transition: 0.5s;
}
.card:hover .percent .number h2{
color: rgb(0, 0, 0);
font-size: 60px;
}
.percent .number h2 span{
font-size: 24px;
color: #fe4f4f;
}
.card:hover .percent .number h2 span{
color: rgb(0, 0, 0);
}
.text{
position: relative;
color: white;
margin-top: 20px;
font-weight: 700;
font-size: 18px;
letter-spacing: 2px;
text-transform: uppercase;
transition: 0.5s ;
}
svg {
position: relative;
width: 150px;
height: 150px;
transform: rotate(-85deg)!important;
}
svg circle{
width: 100%;
height: 100%;
fill: none;
stroke: #e79595a2;
stroke-width: 10;
stroke-linecap: round !important;
transform: translate(5px, 5px);
}
svg circle:nth-child(2){
stroke-dasharray:440;
stroke-dashoffset: 440;
}
.card:nth-child(1) svg circle:nth-child(2){
stroke-dashoffset: calc(440 - (440 * 10) / 100);
stroke: rgb(255, 0, 0);
}
.card:nth-child(2) svg circle:nth-child(2){
stroke-dashoffset: calc(440 - (440 * 60) / 100);
stroke: rgb(255, 0, 0);
}
.card:nth-child(3) svg circle:nth-child(2){
stroke-dashoffset: calc(440 - (440 * 1) / 100);
stroke: rgb(255, 0, 0);
}
@media only screen and (max-width:600px)
{
.porcentage{
height: auto;
margin-left: 30px;
flex-flow: row wrap;
}
}
@media screen and(max-width: 1068px){
.container2{
max-width: 80rem;
min-width: 70rem;
}
.blog-post_img{
min-width: 30rem;
max-width: 30rem;
}
}
@media screen and (max-width: 868px){
.container2{
max-width: 80rem;
}
}
@media screen and (max-width: 768px){
.container2{
padding: 2.5rem;
flex-direction: column;
margin-top: 20px;
}
.blog-post_img{
min-width: 100%;
max-width: 100%;
transform: translate(0,-2rem);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.