File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
starter/03-CSS-Fundamentals Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -244,3 +244,46 @@ button {
244
244
bottom : 50px ;
245
245
right : 50px ;
246
246
}
247
+
248
+ /* * Pseudo Element (use double colon "::" */
249
+ h1 ::first-letter {
250
+ font-style : normal;
251
+ margin-right : 5px ;
252
+ }
253
+
254
+ /* p::first-line {
255
+ color: red;
256
+ } */
257
+
258
+ /* * Adjacent sibling selector:
259
+ * is the selector of the element that share the same parent.
260
+ */
261
+ h3 + p ::first-line {
262
+ color : red;
263
+ }
264
+
265
+ h2 {
266
+ /* background-color: orange; */
267
+ position : relative;
268
+ }
269
+
270
+ /* * Pseudo element: first child element of the parent "h2" */
271
+ h2 ::before {
272
+ }
273
+
274
+ /* * Pseudo element: last child element of the parent "h2" */
275
+ h2 ::after {
276
+ content : "TOP" ;
277
+ background-color : # ffe70e ;
278
+ color : # 444 ;
279
+ font-size : 16px ;
280
+ font-weight : bold;
281
+ display : inline-block;
282
+ padding : 5px 10px ;
283
+ position : absolute;
284
+ /* * Negative Length:
285
+ * It will move to the opposite direction of specify attributes.
286
+ * */
287
+ top : -10px ;
288
+ right : -25px ;
289
+ }
You can’t perform that action at this time.
0 commit comments