zoukankan      html  css  js  c++  java
  • html常用样式

     字体样式:
    1:font-family    设置字体类型如:楷体;宋体
    2:font-size        设置字体大小
    3:font-style       设置字体风格
    4:font-weighi    设置字体的粗细   bole
    使用:font----- 风格  粗细   大小 类型;    顺序不能乱!!!
    div:first-child  span         设置div下的第一个span标签
    div:last-child  span          设置div下的最后一个span标签
    text-align        设置文本水平对齐方式center居中对齐 left左对齐
    text-indent      设置首行缩进P{ text-indent :2em }
    border:    1px    solid (实线)dashed(虚线)   颜色  ;边框设置
    text-shadow:red  2px  2px 1px;文本阴影
    line-height          设置文本的行高
    text-decoration  设置文本的装饰,underline下划线   overline上划线
    display:inline-block         行内快元素;是快元素在一行显示
    display:block;                行内元素转换成快元素
     超链接伪类:
     选择器:伪类名
               {
              属性:属性值
                }
       伪类名:
    :link      ————》      还没点击超链接的样式
    :hover  ————》      鼠标悬停事件
    :active  ————》      鼠标点击未释放
    :visited ————》      点击后的超链接样式
    list-style:                设置列表样式
    none :无符号 disc:实心圆 circle空心圆 decimal  数字
    list-style-image:url(图片路径);           图片代替项目符号
    background:url(路径) no-repeat          背景图片不进行平铺
    background-position:X    Y;                   设置图片位置
    background-size :                                       对图片大小进行设置
    cover:填充整个盒子  ;contain:自动放大或缩小;适应盒子
    background:linear-gradient(位置,开始的颜色,结束的颜色);颜色渐变

    ****************************************************************************************
                                          常用属性
    padding: 0px;       边框内的距离
    margin: 0px;        边框外的距离 
    position: relative;         相对定位
    top: 20px;                      距离上端的距离
    border: 1px solid #dcdcdc;                                      边框    粗细   实现      颜色
    border-bottom: 1px dashed #dcdcdc;                     设置下边框
    background-image: url("../tupian/toolbar_05.png");背景图片
    background-repeat: no-repeat;                                 背景图片不平铺

    padding-left: 30px;                        距离左端的距离
    background-position: 10px 6px; 偏移  X轴    Y轴
    position: absolute;         添加一个层;进行位置偏移
    z-index: 1;                       调上一层
    border-radius: 100%;     边框的变圆
    text-align: center;           字体进行水平居中
    line-height: 15px;            向上移动
    position: absolute;         位置偏移
    top: -5px;                         距离上端的距离
    right: 45px;                      距离右端的距离
    display: none;                 把内容进行隐藏起来
    list-style: none;              去掉无序列表前的项目符号!!!
    text-decoration: none;   去掉下划线
    font-weight: bolder;       文本加粗
    cursor: pointer;              鼠标滑过显示小手形状
    content: "*";                    改变无序列表前的项目符号

  • 相关阅读:
    IPC之util.h源码解读
    新麦装机问题汇
    AngularJS2+调用原有的js脚本(AngularJS脚本跟本地原有脚本之间的关系)
    K60平台智能车开发工作随手记
    苹果手机上下载的文件在哪里?
    Mac电脑C语言开发的入门帖
    Python2中文处理纪要
    比特币核心概念及算法
    将dylib库嵌入macOS应用的方法
    那些令人惊艳的TensorFlow扩展包和社区贡献模型
  • 原文地址:https://www.cnblogs.com/xiaobaizhang/p/7768537.html
Copyright © 2011-2022 走看看