-
Notifications
You must be signed in to change notification settings - Fork 1
/
before_and_after_in_css.html
103 lines (87 loc) · 2.44 KB
/
before_and_after_in_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
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
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BEFORE AND AFTER IN PSEUDO SELECTORS</title>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,600&display=swap" rel="stylesheet">
</head>
<style>
body {
padding: 0;
margin: 0;
color: azure;
background-color: black;
font-family: 'Playfair Display', serif;
/* background: url(code.jpg) no-repeat center center/cover; */
}
ul {
display: flex;
flex-direction: row;
list-style: none;
}
li {
padding: 2rem;
font-size: 1.2rem;
margin-bottom: 2rem;
}
section {
/* border: 2px solid red; */
display: flex;
flex-direction: column;
align-items: center;
font-weight: bold;
font-size: 1rem;
/* margin: 5rem; */
justify-content: center;
text-align: center;
padding: 1.1rem 1.1rem;
}
h1 {
margin-top: 8rem;
font-size: 3rem;
}
header::before{
background: url("https://cdn.pixabay.com/photo/2017/09/24/11/59/password-2781614_1280.jpg") no-repeat center center/cover ;
content: "";
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
top: 0;
left: 0;
opacity: 0.4;
}
/* section::before{
content: "hi my name is abhishek";
} */
/* section::after {
content: "hi my name is abhishek";
} */
</style>
<body>
<header class="head">
<nav class="navbar">
<ul>
<li class="sahil">Home</li>
<li class="sahil">About</li>
<li class="sahil">Support</li>
<li class="sahil">Contact Us</li>
</ul>
</nav>
<section>
<div>
<h1>WELCOME TO CODING WORLD</h1>
</div>
<div>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Odit quo debitis voluptatum optio,
molestiae dolorum earum ut blanditiis voluptas aut? Porro, excepturi sit quaerat dolorum iusto
voluptatibus voluptates impedit nostrum facere, ducimus nobis illo.
</p>
</div>
</section>
<hr>
</header>
</body>
</html>