Day04

今天学到了什么?

一、列表样式

1.列表样式

list-style:none;

2.列表样式类型

list-style-type:disc|circle|square

3.列表样式图片

list-style-image
二、字体

1.最小的字体-->不要小于12px
font-size字体大小
2.字体样式
font-style:normal|italic
3.字体的权重
font-weight:bold|bolder|lighter

三、链接

链接的样式类型

link// 没有访问的链接
visited//已经访问过的链接
hover// 鼠标移入到链接上的状态
active// 鼠标点击的那一刻

tip:同时使用链接的这几种状态,顺序不打乱
四、文本

1.文本对齐

text-align:left|center|right 
  p{
     text-align: center;
    }

2.文本修饰

text-decoration:none|underline|overline|line-through
 a{
     text-decoration:line-through;
   }

3.文本缩进

text-indent 

4.文本转换

text-transfomr:uppercase|lowercase|capitalize
   h4{
   text-indent: 20px;
   text-transform: capitalize;
  }
<!-- lorem+tab 快速写出一段废话 -->

5.文本颜色

颜色
  red -->纯色
  #ff2d51
  rgb()
五、背景

1.背景重复

background-repeat:no-repeat|repeat-x|repeat-y
                   background-repeat: no-repeat;

2.背景位置

background-position-x:横坐标方向的位置
            background-position-y:纵坐标方向的位置
            //传参 top,right,bottom,left,center

3.背景简写

 background-position: x y

            1.background-position: center center
2.background:color image repeat position

4.背景大小

background-size:x y;
            x -->width
            y -->height
           // cover -->会覆盖整个div  特点:只能以大覆小

5.背景吸附

background-attachment:scroll|fixed;
六、表格

1.表格标签

<table>
<tr><td></td></tr>
</table>

2.表格样式

border-collapse: collapse;
line-height: 50px;
text-align: center;
1.跨行:rowspan//谁要跨越给谁rowspan;
2.跨列:colspan//谁跨越列给谁colspan;
七、继承关系

1.继承:子级对父级的关系

<style>
.parent{
            width:200px;
            background:red;
        }
        .child{
            width:100px;
            height:100px;
            background:blue;
        }
   </style>
</head>
<body>
        <div class="parent">
        <div class="child"></div>
    </div>
</body>
//父元素不设置height,它会获取子元素的height

2.width的继承

<style>
.parent{
            width:200px;
            height:200px;
            background:red;
        }
        .child{
            height:100px;
            background:blue;
        }
   </style>
</head>
<body>
        <div class="parent">
        <div class="child"></div>
    </div>
</body>
//Tips:仅仅发生在块级元素之间
 子元素不设置宽度,它会继承父元素的宽度---(块)
八、轮廓和设置透明度

1.轮廓outline

<style>
div{
            width:100px;
            height:100px;
            background:#ff2d51;
            outline: 10px solid #44cef6;
        }
        input{
            margin-top: 50px;
            outline: none;
        }
<div>
    </style>
</head>
<body>

    </div>
    <input type="text">
</body>

2.设置透明度

width: 100px;
            height: 100px;
            background: red;
            opacity: 0.5;
//opacity设置元素的透明度

今天的内容还需花时间学习(不熟练)

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 记录现金流游戏沙龙的筹备过程,和2018年6月30日下午举办过程,以及游戏过程中的心得总结。 从6月1日正式向吴老...
    道长归来阅读 603评论 2 4
  • 2018年,我将30了,回顾我的前30年,我奢侈地体验了“无为”。今日回首,甚是感慨万分,感恩上帝,感恩遇见...
    UP玲玲阅读 533评论 0 3
  • 2018年1月28日 星期日 雨 今天的雨下得有点大,天一下子就变冷了,这时才真正感觉到冬...
    A小青竹阅读 279评论 0 0
  • 又到了交文章的日子了,可是我的脑袋里确空空如也。最近实在太衰,首先被检查出有肝炎,刚住进医院又出了带状疱疹……顿时...
    火之木叶啊阅读 240评论 1 0