-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathovning2_4.html
95 lines (71 loc) · 5.06 KB
/
ovning2_4.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html lang='sv'>
<head>
<meta charset='utf-8'>
<title>IB908C</title>
<link rel="stylesheet" href="lib/css/master.css" type="text/css" media="screen" charset="utf-8" />
</head>
<body class="backgroundimage">
<header>
<h1>
Övning 2.4
</h1>
</header>
<h2>Background</h2>
Används för att styra bakgrunden på en webbsida. Precis som i tidigare exempel så finns ett antal specifika inställningar som kan göras, nämligen:
<ol>
<li>
background-color
</li>
<li class="backgroundimage">
background-image
</li>
<li>
background-repeat
</li>
<li>
background-attachment
</li>
<li>
background-position
</li>
</ol>
men man kan använda det sammansatta begreppet "background" för att styra de på en och samma rad (ordningen ovan gäller).
Exempelvis:
<p>
span.padding {
<br>
<span class="leftindent">background: #ffffff url("fot.png") no-repeat right top;</span>
<br>
}
</p>
<h1> CSS och img-taggen! </h1>
<p>
Antingen använder man en class-selektor för att styra hur img-taggen ska se ut/fungera mha CSS, eller så styr man alla img-taggar som så:
<p>
img {
<div class="leftindent">
border: 1px solid #ddd; <br>
border-radius: 4px;<br>
padding: 5px; <br>
width: 150px; <br>
</div>
}
</p>
</p>
<p>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate <img class="flowimage" src="lib/images/cykelliten.jpg" alt=""> velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</p>
<p>
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
</p>
<p>
<h1>
"But I must explain"
</h1> to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
</p>
<p>
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
</p>
</body>
</html>