This repository has been archived by the owner on Mar 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eventi_click_checkbox.html
54 lines (45 loc) · 1.44 KB
/
eventi_click_checkbox.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Eventi CSS - Prima parte :: Laboratorio CSS</title>
<link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700' rel='stylesheet' type='text/css' />
<link href="common/css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
*{margin:0;padding:0}
#content{text-align:center;}
p{margin-bottom:10px;}
input[type=checkbox] {
display:none;
}
label{
display:block;
background:#08C;
padding:5px;
border:1px solid rgba(0,0,0,.1);
border-radius:2px;
color:white;
font-weight:bold;
}
input[type=checkbox]:checked ~ .change {
color:red;
}
</style>
</head>
<body>
<a id="logo" href="http://www.laboratoriocss.it" title="Laboratorio CSS" class="logo"><img src="common/img/structure/logoLabcss.png" alt="Logo laboratorio CSS" /></a>
<div id="container">
<div id="header">
<h1><a href="http://www.laboratoriocss.it/eventi-in-css-prima-parte.html">Eventi CSS - Prima parte</a></h1>
<p id="description">In questa prima parte l'evento css viene generato da un input di tipo checkbox.</p>
</div>
<div id="content">
<!-- ESEMPIO -->
<input type="checkbox" id="toggle">
<label for="toggle">Clicca</label>
<p class="change">Lorem Ipsum è un testo segnaposto utilizzato nel settore della tipografia e della stampa.</p>
<!-- //ESEMPIO -->
</div>
</div>
</body>
</html>