Skip to content

Instantly share code, notes, and snippets.

@felipelavinz
Last active December 24, 2015 18:09
Show Gist options
  • Save felipelavinz/6840910 to your computer and use it in GitHub Desktop.
Save felipelavinz/6840910 to your computer and use it in GitHub Desktop.
Ejercicio CSS
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Most Commented</title>
<link rel="stylesheet" href="https://raw.github.com/necolas/normalize.css/master/normalize.css" type="text/css">
<style type="text/css">
/* Sus estilos */
body{
background: #141414;
font-family: sans-serif;
font-size: 16px;
}
h1{
font-size: 24px;
color: #fff;
}
a{
color: #000;
}
ul{
width: 400px;
}
ul, li{
margin: 0;
padding: 0;
}
li{
list-style: none;
margin-bottom: -10px;
}
li > a{
display: block;
position: relative;
padding: 20px 10px 30px;
text-decoration: none;
border-radius: 10px;
}
.commented-entry a:hover{
background-color: #fff;
}
.commented-entry a:hover .comment-count{
background-color: #ccc;
color: #000;
}
.comment-count{
position: absolute;
top: 10px;
right: -8px;
color: #fff;
background: #141414;
font-size: 11px;
padding: 4px;
border-radius: 5px;
}
.most-commented-1 a{
background-color: rgba(196, 58, 89, .5);
}
.most-commented-2 a{
background-color: rgba(197, 56, 47, 0.5);
}
.most-commented-3 a{
background-color: rgba(195, 132, 42, 0.5);
}
.most-commented-4 a{
background-color: rgba(199, 196, 36, 0.5);
}
.most-commented-5 a{
background-color: rgba(160, 201, 38, 0.5);
}
</style>
</head>
<body>
<h1>Most commented</h1>
<ul>
<li class="commented-entry most-commented-1">
<a href="#post-1">
<span class="entry-title">The hidden power of border-radius</span>
<span class="comment-count">78</span>
</a>
</li>
<li class="commented-entry most-commented-2" style="width:96%">
<a href="#post-2">
<span class="entry-title">Win a copy of The Smashing Book!</span>
<span class="comment-count">75</span>
</a>
</li>
<li class="commented-entry most-commented-3" style="width:88%">
<a href="#post-3">
<span class="entry-title">The six fundamental ways of adding depth to your designs</span>
<span class="comment-count">69</span>
</a>
</li>
<li class="commented-entry most-commented-4" style="width:46%">
<a href="#post-4">
<span class="entry-title">How to create a fluid grid with jQuery</span>
<span class="comment-count">36</span>
</a>
</li>
<li class="commented-entry most-commented-5" style="width:39%">
<a href="#post-5">
<span class="entry-title">Contact form or mailto link?</span>
<span class="comment-count">31</span>
</a>
</li>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment