Skip to content

Instantly share code, notes, and snippets.

@ktzanev
Last active March 12, 2017 11:15
Show Gist options
  • Save ktzanev/764b30e3804cce2591271579e24dc315 to your computer and use it in GitHub Desktop.
Save ktzanev/764b30e3804cce2591271579e24dc315 to your computer and use it in GitHub Desktop.
pseudo-classes (GistRun)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>pseudo-classes</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div>
<img src="https://goo.gl/HgDoS8"/>
<img src="https://goo.gl/7v3BtW"/>
<img src="https://goo.gl/CuztQY"/>
</div>
<div></div>
</body>
</html>
img {
display: block;
width : 30vw;
margin:10px;
}
img:hover {
outline: 1vh solid red;
cursor:pointer;
}
img:nth-child(odd) {
outline-color: blue;
}
:not(img) {
background: rgba(0,0,35,.3);
}
div:empty {
height:5vh;
background: rgba(255,0,0,.3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment