zoukankan      html  css  js  c++  java
  • 样式属性集合 2017-03-13

    一、        背景与前景

    background-color: red;  背景色

    background-image: url(1.jpg);  设置背景图片

    background-repeat: repeat; 设置是否平铺

    repeat:平铺; no-repeat: 不平铺; repeat-x:横向平铺; repeat-y:纵向平铺

    background-position: right top;/ center/ left : 100px top 200px(离左边100像素;上边200像素;可以设置为负值);

    设置背景图片位置时,repeat必须为no-repeat

    background-attachment: fixed;/scrolling   背景是否随字体滚动

    overflow: scroll;

    background-size: 400px,400px;

    二、        字体

    font-family: 字体 (face)

    font-size: 字体大小 (1)用像素表示;( 2)用"small, larger"表示;

          (3)用百分比表示; (4)用"em"表示,"2.5em " 即:默认字体的2.5倍.

    Font-weight: 字体粗细。 (1)bold  加粗/normal 正常  (2) 用数字表示

    Font-style: italic/ oblique 倾斜 /normal 正常     是否倾斜

    Color 字体颜色,前面没有font

    Text-decoration: underline   下划线,overline是上划线,line-through是删除线;none是去掉下划线。

    Text-align:center/right/left   水平居中对齐,左对齐,右对齐

    Vertical-align: middle/top/bottom  垂直居中对齐,顶部对齐,底部对齐  在设置行高后使用

    Line-height: 14px  行高  (一般位1.5~2倍字体大小)

    作用:垂直方向居中

    Display: none  不显示,不占位

    Visibility hidden 隐藏但占空间

    三、        列表与方块

    List-style: none   取消序号 (下拉菜单中常用)

    List-style: circle  序号变位圆圈,样式相当于无序

    List-style-image: url(图片地址): 用图片做序号

    List-style-position: outside 序号在内容外

    List-style-position: inside   序号跟内容在一起

    Reflection:

    Take advantage of your time, and make full use of it.

    Thanks for the night is so quiet, thanks for the startnight is so peaceful, thanks for the day passed was beautiful.

    Everything will go okay.

  • 相关阅读:
    virtualenvwrapper GitBash下的配置使用
    MySQL主从复制
    Nginx
    LVS
    MySQL
    Docker Swarm
    flask数据库操作
    flask 数据库迁移
    pytest.mark.parametrize 详解
    redis作为变量池在接口自动化中的应用
  • 原文地址:https://www.cnblogs.com/chenguanai/p/6545670.html
Copyright © 2011-2022 走看看