
css
文章平均质量分 53
燃烧岁月-------
环境不会轻易改变,那就改变自己
展开
-
css颜色的表现形式 em vw vh px
1.1 css基本概念:Css层叠样式表Html描述了呈现的内容,而css则定义了这些内容的呈现样式,比如字体的颜色、大小,使用css能够使页面的内容和呈现方式有效分离,有助于分工合作,也有利于快速切换不同的呈现形式。 使用样式表有三种:内联样式:pstyle="font-family:黑体;font-size:20px;color:blue" >内联样原创 2017-07-12 08:47:49 · 2557 阅读 · 0 评论 -
display: inline-block
html>html>head lang="en"> meta charset="UTF-8"> title>title> style> .aa{ width: 400px; height: 400px; background-color: red;原创 2017-07-18 20:11:50 · 1750 阅读 · 0 评论 -
hover active link visited
html>head lang="en"> meta charset="UTF-8"> title>title> style> /*a:hover鼠标划过时的样式*/ /*a:active鼠标左键点击的一瞬间*/ /*a:link 鼠标的点击之前的效果*/ /*a:visited鼠标点击之后原创 2017-07-17 20:58:04 · 2181 阅读 · 0 评论 -
通配符选择器子元素选择器后代选择器
html>head lang="en"> meta charset="UTF-8"> title>title> style> div{ min-height: 30px; max-width: 300px; background-color: white;原创 2017-07-17 20:48:34 · 1678 阅读 · 0 评论 -
选择器
所谓选择器,指的是选择施加样式目标的方式。3.1 元素选择器用标签名作为选择器,选中所有相应的元素head> meta http-equiv="Content-Type"content="text/html; charset=utf-8"/> title>title> style type="text/css"> div{原创 2017-07-13 20:43:12 · 1809 阅读 · 0 评论 -
定位
定位方式有:static、fixed、relative、absolute。static 静态定位(默认)无定位,元素正常出现了流中,不受left、right、top、bottom属性的影响。div{ width: 200px; height: 200px; background-color: red; position: static;}原创 2017-07-13 20:38:07 · 1768 阅读 · 0 评论 -
盒子模型
margin:外边距margin-top、margin-right、margin-bottom、margin-left使用方式(1)margin:30px;表示上下左右外边距都未30px;(2)margin-left:30px;单独设置上下左右外边距(3)margin:10px 20px 30px 40px;分别设置上右下左四个边距为10px 20px 30px 40px原创 2017-07-13 20:36:15 · 1755 阅读 · 0 评论 -
尺寸相关属性
height:高度width:宽度div{ width: 200px; height: 200px; background-color: red;}max-width:最大宽度max-height:最大高度min-width:最小宽度min-height:最小高度原创 2017-07-13 20:33:32 · 1884 阅读 · 0 评论 -
背景相关属性
background-color:背景色background-image:设定背景图片,需要设置图片的url地址background-repeat:图片的复制选项repeat:在水平和垂直两个方向上进行复制no-repeat:不复制repeat-x:在水平方向上复制repeat-y:在垂直方向上复制也可以将这一组属性值封装到一个属性background中,书写书序是:原创 2017-07-13 20:28:34 · 2363 阅读 · 0 评论 -
基础属性文本修饰
基础属性属性名:属性值Backgroud-color:red;P{Backgroud-color:red;Font-size:12px;}字体相关的属性:Font-family:字体名称Font-size::字体大小Font-style:字体的样式Font- weight:字体的粗细 font-variant :字体的变化(如大写)取值:原创 2017-07-12 20:04:56 · 2585 阅读 · 0 评论