![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CSS
小白在努力!
这个作者很懒,什么都没留下…
展开
-
CSS常用简单语法笔记
<html> <head> <style> a{ text-decoration: none;/*decoration里面默认是underline,这里把她改为none,这样就可以去掉下划线*/ } #dl{/*id选择器需要前加#*/ width: 300px; height: 40px;/*这里的height是文字高*/ line-hei.原创 2021-03-14 11:36:54 · 115 阅读 · 0 评论 -
HTML字体
font: a.顺序必须为style,weight,size,family b.font必须要有size,family <html> <head> <style> p{ font-style: italic;/*字体风格,正常,斜体等*/ font-weight: bold; font-size:12px/50px;/*字高1...原创 2021-03-14 11:35:36 · 120 阅读 · 0 评论 -
padding用法
<html> <head> <title></title> <style> span{ background-color: rgb(76, 236, 71); } i{/*padding是内边距,向内扩展,与margin正好相反*/ background-color: rg.原创 2021-03-14 11:33:56 · 774 阅读 · 0 评论 -
margin用法
<html> <head> <style> span{ background-color: rgb(231, 70, 48); } i{/*margin用于设置当前标记距离其他标记的间距,外边距*/ background-color: rgb(200, 78, 211); disp.原创 2021-03-14 11:33:13 · 717 阅读 · 2 评论 -
CSS中的position
position:fixed他是相对body来定位的,脱离文档流 position:relative它是相对于自身来变化的,而且不会脱离文档流 position:absolute脱离文档流,相对于position为非static的父标记定位 <html> <head> <title></title> </head> <body> <!--position原创 2021-03-14 11:32:08 · 57 阅读 · 0 评论 -
HTML/CSS选择器
HTML/CSS选择器分类: 1.标签选择器,同时对div两个标签都调整 2.id选择器 3.类选择器 4.分组选择器(用逗号隔开的多个选择器组成分组选择器) 5.后代选择器:父子选择器构成的一种选择器 6.*选择器:全选择器 为什么要用选择器? 使用style标签属性可以为html标签添加样式,但这种方式与html标签会耦合,不便于后期维护。样式和标签分开,对后期的修改维护有很大好处,而且代码简洁明了,增加可读性。浏览器可以选择为哪些标签添加样式标识符。 <html> ...原创 2021-03-14 11:29:55 · 70 阅读 · 0 评论 -
CSS浮动
浮动float 练习: 浮动是为了消除间隙,浮动后要对块级元素消除浮动,这样才能对齐切其他标签不变形。 <html> <head> <style> .a{ border:5px solid rgb(219, 21, 21); font-size: xx-large; font-family: sans-serif; float: left;/*向左浮动*/原创 2021-03-14 11:26:00 · 81 阅读 · 0 评论