会员
周边
众包
新闻
博问
闪存
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
haha
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
8
下一页
2021年8月22日
CSS——内外边距及div居中
摘要: 外边距的妙用:居中元素 margin: 0 auto div盒子居中 margin:0 auto; margin:0 margin:0 1px margin:0 1px 2px 3px 顺时针 上 右 下 左 完整代码 #box{ width:300px; border:1px solid blac
阅读全文
posted @ 2021-08-22 20:20 cengxuyuan
阅读(237)
评论(0)
推荐(0)
2021年8月19日
CSS——盒子模型及边框
摘要: 什么是盒子模型 边框 border 外边距 margin 内边距 padding 边框 边框粗细 边框样式 边框颜色 /* body总有一个默认的外边距margin:0 */ body{ margin:0; } /* border:粗细 实虚线 颜色 */ #box{ width:300px; bo
阅读全文
posted @ 2021-08-19 20:29 cengxuyuan
阅读(104)
评论(0)
推荐(0)
2021年8月18日
CSS——背景图像及渐变
摘要: 背景图像 div{ width:700px; height:700px; border:1px solid red; background-image:url("image/img.png"); /* 默认全部是平铺 */ } .div1{ background-repeat:repeat-x; /
阅读全文
posted @ 2021-08-18 20:31 cengxuyuan
阅读(247)
评论(0)
推荐(0)
2021年8月16日
CSS——列表
摘要: ul li list-style: none; 去掉原点 circle; 空心圆 decimal; 数字 square; 正方形 ul{ background:pink; } ul li{ height:30px; list-style:none; text-indent:1.5em; }
阅读全文
posted @ 2021-08-16 18:11 cengxuyuan
阅读(34)
评论(0)
推荐(0)
CSS——阴影及超链接伪类
摘要: 阴影 text-shadow: 阴影颜色,水平偏移。垂直偏移,阴影半径 #num{ text-shadow:black 5px 0px 15px; } 超链接伪类 /* 默认的颜色 */ a{ text-decoration:none; } /* 鼠标悬浮的状态 */ a:hover{ color:
阅读全文
posted @ 2021-08-16 17:11 cengxuyuan
阅读(37)
评论(0)
推荐(0)
2021年8月14日
CSS——文本样式
摘要: 颜色 color rgb rgba 2.文本对齐的方式 text-align:center; 3.首行缩进 text-indent:2em; 4.行高 line-height: 单行文字上下居中! line-height:height; 5.装饰 text-decoration 6.文本图片水平对齐
阅读全文
posted @ 2021-08-14 22:01 cengxuyuan
阅读(36)
评论(0)
推荐(0)
CSS——字体样式
摘要: 1.有效的传递页面信息 2.美化网页,页面漂亮,吸引用户 3.凸显页面的主题 4.提高用户的体验 span标签:重点要突出的字,使用span套起来 欢迎学习<span id="title">Java</span> font-size 字体大小 font-family 字体样式 font-weight
阅读全文
posted @ 2021-08-14 17:29 cengxuyuan
阅读(38)
评论(0)
推荐(0)
2021年8月13日
CSS——属性选择器
摘要: 属性名, 属性名=属性值(正则) * 绝对等于 *= 包含这个元素 ^= 以什么开头 $= 以什么结尾 /* 存在id属性的元素 a[]{} */ a[id=first]{ background:orange; } /* class中有links的元素 */ a[class*="links"]{ b
阅读全文
posted @ 2021-08-13 19:33 cengxuyuan
阅读(51)
评论(0)
推荐(0)
CSS——伪类选择器
摘要: /* ul的第一个子元素 */ ul li:first-child{ background:gray; } /* ul的最后一个子元素 */ ul li:last-child{ background:green; } /* 选中p1: 定位到父元素,选中当前的第一个元素 选择当前p元素的父级元素,选
阅读全文
posted @ 2021-08-13 16:26 cengxuyuan
阅读(48)
评论(0)
推荐(0)
CSS——层次选择器
摘要: 1.后代选择器 2.子选择器 3.兄弟选择器 4.通用选择器 1.后代选择器:在某个元素后面 (祖爷爷 爷爷 爸爸 你) body p{ background:orange; } 2.子选择器,一代,儿子 body>p{ background:red; } 3.相邻兄弟选择器:只有一个,相邻(向下)
阅读全文
posted @ 2021-08-13 15:58 cengxuyuan
阅读(85)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
8
下一页
公告