[英]How do i change the color of an element inside a header element? HTML and CSS
嘗試用顏色替換文本裝飾:
body { background-color: #181e27; font-family: sans-serif; margin: 0px; padding: 0px; } header { background-color: #0e1116; padding: 20px; } h2 { color: #b6b9bc; margin: 0px; padding: 0px; }
<,DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width. initial-scale=1,0"> <title>Opgave 2, svar og sprorgsmal</title> </head> <body> <header> <h2>Opgave 2, svar og sprorgsmal</h2> </header> </body> </html>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.