一,效果圖。
二,代碼。
DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS id和class選擇器title>
<style>
#para1 {
text-align: center;
color: red;
}
.center {
text-align: center;
}
p.center {
text-align: right;
}
style>
head>
<body>
<p id="para1">hellop>
<p>this paragraph is not affected by the style.p>
<h1 class="center">標(biāo)題居中h1>
<p class="center">段落居中p>
body>
html>
?
參考資料:《菜鳥教程》
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://www.ezyhdfw.cn/yun/1332.html
一,效果圖。二,代碼。DOCTYPEhtml><html><head><metacharset="utf-8"><title>CSSAligntitle><style>body{margin:0;padding:0;} .container{position:relative;width:100%;} ...
一, 效果圖。 二,代碼。 ? DOCTYPE html> CSS 分組和嵌套 h1, h2, p { color: green; } .marked { background-color: red; } .marked p { col...
一,效果圖。 二,代碼。 DOCTYPE html> CSS 教程 body { background-color: #d0e4fe; } h1 { color: range; text-align: center; } p { fon...
一,效果圖。 二,代碼。 DOCTYPE html> CSS 語法 p { color: red; text-align: center; } Hello world! this paragraph is styled with css ? 參考資料:《菜鳥教程》
摘要:實例改文本插入在元素中該段落有自己的背景顏色背景圖片不重復(fù),設(shè)置實例背景圖片只顯示一次,并與文本分開實例中還添加了屬性用于讓圖片與文本間隔開參考資料菜鳥教程一,效果圖。 二,代碼。 DOCTYPE html> CSS backgrounds h1 { background-color: #6495ed; } ...
閱讀 1955·2021-11-15 11:39
閱讀 1153·2020-12-03 17:06
閱讀 803·2019-12-27 11:42
閱讀 3319·2019-08-30 13:59
閱讀 1542·2019-08-26 13:22
閱讀 3327·2019-08-26 12:15
閱讀 2523·2019-08-26 10:22
閱讀 1639·2019-08-23 18:40