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.

  • 相关阅读:
    vue中使用axios对同一个接口连续请求导致返回数据混乱的问题
    GitLab 项目
    pythonWeb开发
    $(function(){})里面不能定义函数
    elementUI el-cascader回显问题
    elementUI 弹框嵌套蒙层问题
    JS获取浏览器信息及屏幕分辨率
    mockjs导致element-ui upload组件的on-progress和axios的responseType失效
    vue中记录页面的滚动距离
    vue组件的inheritAttrs属性
  • 原文地址:https://www.cnblogs.com/chenguanai/p/6545670.html
Copyright © 2011-2022 走看看