-
Notifications
You must be signed in to change notification settings - Fork 0
/
03_css.html
50 lines (40 loc) · 1.22 KB
/
03_css.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
<!DOCTYPE html>
<html lang="en" ng-app>
<!-- ng-app inizializza Angular su un preciso elemento HMTL, in questo caso tutta la pagina -->
<head>
<meta charset="UTF-8">
<title>AngularJS template</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Libs + script -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<script src="bower_components/angular/angular.min.js"></script>
<style>
.forma{
margin: 20px 0;
background-color: #009eee;
height: 200px;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>Collegarsi ai CSS</h1>
</div>
<div class="col-md-12" ng-init="numero = 0">
<h3>Classe dinamica</h3>
<div class="form-group" ng-class="{'has-error': numero < 5, 'has-success': numero > 5}">
<label class="control-label">Inserisci un numero maggiore di 5</label>
<input type="number" class="form-control" ng-model="numero">
</div>
</div>
<div class="col-md-12" ng-init="larghezza = 200">
<h3>Stili in linea</h3>
<input type="number" class="form-control" ng-model="larghezza">
<div class="forma" style="width: {{larghezza}}px"></div>
</div>
</div>
</div>
</body>
</html>