Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions estilos.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
body {
margin: 0;
padding: 0;
background-color: #E5E5E5;
font-family: 'Poppins', sans-serif;
}

.main-album {
display: flex;
flex-wrap: wrap;
width: 350px;
height: 170px;
background-color: #fff;
border-radius: 5px;
box-shadow: 1px 2px #ccc;
}

.album {
display: flex;
width: inherit;
height: 65%;
box-shadow: 0 1px #ccc;

}

.album-cover {
width: 35%;
height: 100%;
background-image: url(https://direct.rhapsody.com/imageserver/images/alb.236486660/500x500.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
margin: 0;
}

.album-info {
width: 67%;
margin: 0;
padding: 10px;
padding-left: 20px;
}

.album-info-title {
margin: 0;
}

.title1 {
font-weight: normal;
font-size: 22px;
}

.title2 {
font-weight: 300;
font-size: 13px;
color: #656565;
}

.rating {
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
padding: 0 15px 10px 15px;
}

.rating p {
margin: 0;
font-size: 13px;
font-weight: 300;
color: #656565;
}

/* De aquí en adelante aún no lo domino por completo */

.rating-score:not(:checked) > input {
position:absolute;
top:-9999px;
}
.rating-score:not(:checked) > label {
float:right;
width:1em;
margin: 5px;
overflow:hidden;
white-space:nowrap;
cursor:pointer;
font-size: 20px;
color:#ccc;
}
.rating-score:not(:checked) > label:before {
content: '★ ';
}
.rating-score > input:checked ~ label {
color: #ffc700;
}
.rating-score:not(:checked) > label:hover,
.rating-score:not(:checked) > label:hover ~ label {
color: #deb217;
}
.rating-score > input:checked + label:hover,
.rating-score > input:checked + label:hover ~ label,
.rating-score > input:checked ~ label:hover,
.rating-score > input:checked ~ label:hover ~ label,
.rating-score > label:hover ~ input:checked ~ label {
color: #c59b08;
}
42 changes: 42 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./estilos.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,300;0,400;0,600;1,100;1,300;1,500&display=swap" rel="stylesheet">
<title>Challenge CSS 05</title>
</head>
<body>
<main class="main-album">
<section class="album">
<figure class="album-cover">
</figure>
<article class="album-info">
<h2 class="album-info-title title1">Rozes</h2>
<p class="album-info-title title2">Under the grave<br>(2016)</p>
</article>
</section>
<section class="rating">
<p>Rate this album</p>
<div class="rating-score">
<input type="radio" id="star5" name="rate" value="5" />
<input type="radio" id="star5" name="rate" value="5" />
<label for="star5" title="text">5 stars</label>

<input type="radio" id="star4" name="rate" value="4" />
<label for="star4" title="text">4 stars</label>

<input type="radio" id="star3" name="rate" value="3" />
<label for="star3" title="text">3 stars</label>

<input type="radio" id="star2" name="rate" value="2" />
<label for="star2" title="text">2 stars</label>

<input type="radio" id="star1" name="rate" value="1" />
<label for="star1" title="text">1 star</label>
</div>
</section>
</main>
</body>
</html>