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.

  • 相关阅读:
    Vmware 虚拟硬盘 合并多个分割文件
    一步步带你做vue后台管理框架(三)——登录功能
    一步步带你做vue后台管理框架(二)——上手使用
    webpack教程(六)——分离组件代码
    webpack教程(五)——图片的加载
    webpack教程(四)——css的加载
    input输入框自动填充黄色背景解决方案
    webpack教程(三)——热刷新
    webpack教程(二)——webpack.config.js文件
    webpack教程(一)——初体验
  • 原文地址:https://www.cnblogs.com/chenguanai/p/6545670.html
Copyright © 2011-2022 走看看