网页设计:第二部分CSS

2024.10.28   今天练习了CSS引入方式和CSS选择器

外部样式表:<link rel="stylesheet"  type="text/css"  href="文件路径">

内部样式表:<style  type="text/css">

                        ...

                      </style>

行内样式表:<div  style="color:red">xxxx</div>

32c876de7225478493288a39728435df.png

d98c322920104922b3e3e4695a649b3f.png

在内部样式表中选择器有:        

        元素选择器:div{}、p{}

        id选择器:#id{}

        class选择器:#.class

        后代选择器:father son{}

        群组选择器:div,p{}

94b79fa85f3443368c8e039a5c77b491.png

        2a52e4c5bc23487e8ecbd19b66be3d3a.png

 

2024.10.31今天学习了字体样式和文本样式

font-family:字体类型:微软雅黑、Times New Roman

font-size:字体大小:关键字(small、medium、large);像素值(10px...)

font-weight:字体粗细:bold(较粗)

font-style:字体风格(斜体):italic

color:字体颜色

aa2eac85c9dc4671a116fbc80907d993.png

36126c8a511e4ba08860bd73bd8a72b9.png

text-indent:首行缩进:是字体大小的两倍

text-align:水平对齐:left、center、right

text-decoretion:文本修饰(none去除所有划线、underline、line-through中划线)

text-transform:upercase、lowercase、capitalize(每个单词首字母大写)

line-height:行高

间距:letter-spacing、word-spacing

bd4497608756421db0ed2553c9336f7a.png

1f1951514edc4aebb20c9b8579d53a27.png

 

 

 

2021.11.4今天学习了边框样式、列表样式、表格样式、图片样式、背景样式

border-width        border-color        border-style

简写:border:xxx  xxx  xxx

style:none、dashed(虚线)、solid(实线)

border-top        border-left        border-left        border-right        border-bottom

9fff68f8490e43758b79fffc9be7b89e.png

ca1cc204a5d84d8c9d8f02d19f672915.png

 

list-style-type:none;

list-style-img:url(图片路径)

5bbabf889cc94f148ad00e4c28b90f4e.png

cb67e8da517241bd9505d32800d54016.png

 

 

captian-side:top/bottom(表格标题位置)

border-collapse:collapse/separate(边框合并)

acbe1e3f6a614cb38e991f7190542f0a.png

c99a833e7357480e9f5c184eeaf71fb6.png

 

 

vertical-align:top、middle、bottom、baseline

87e96652534e425793a99bcd573e87ca.png

d0ce77cc17d24fa2bf338af4524cf8e9.png

 

background-color:背景颜色

background-image:url(图片路径)   

background-repeat:reprat-x、reprat-y、no-repeat

background-position

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值