随笔分类 -  CSS

摘要:选择器 :last-child /* 选择元素最后一个孩子 */ :first-child /* 选择元素第一个孩子 */ :nth-child(1) /* 按照第几个孩子给它设置样式 */ :nth-child(even) /* 按照偶数 */ :nth-child(odd) /* 按照奇数 */ 阅读全文
posted @ 2020-07-15 15:51 bingxiaoxiao 阅读(167) 评论(0) 推荐(0) 编辑
摘要:bingxiaoxiao 使用变量 我就是标题 bingxiaoxiao , hello word 版权 2010-2019 、+和~;... 阅读全文
posted @ 2019-04-10 11:56 bingxiaoxiao 阅读(202) 评论(0) 推荐(0) 编辑
摘要:position 元素已知宽度 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>水平垂直居中</title> <style> .father{ background-color: #FF8C00; width: 阅读全文
posted @ 2019-03-01 13:38 bingxiaoxiao 阅读(600) 评论(0) 推荐(0) 编辑
摘要:如何使用css来让图片居中不变形 微信小程序和web端适用 缩放 scaleToFill 不保持纵横比缩放图片,使图片的宽高完全拉伸至填满 image 元素 缩放 aspectFit 保持纵横比缩放图片,使图片的长边能完全显示出来。也就是说,可以完整地将图片显示出来。 缩放 aspectFill 保 阅读全文
posted @ 2019-02-28 10:01 bingxiaoxiao 阅读(1258) 评论(0) 推荐(0) 编辑
摘要:样式优先级 important > 行内样式 > id选择器 > 伪类选择器定义 > 属性选择器 , class类选择器 (谁在下面谁起作用) > 标签选择器 > 通配符* 1、无条件优先的属性只需要在属性后面使用 !important 。它会覆盖页面内任何位置定义的元素样式。IE 6不支持这个属性 阅读全文
posted @ 2017-11-22 10:43 bingxiaoxiao 阅读(1239) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示