zoukankan      html  css  js  c++  java
  • css图片文字相关属性

     设置元素内容的字体:

    (1)字体的名称:font-family属性定义文字使用的字体的名称

    (2)设置字体倾斜程度:font-style属性描述字体的倾斜程度,可选的属性值包括normal、small-oblique

    (3)设置字体的变体:font-variant属性的用于设置字体的变体形式,可选属性值包括normal和samll-caps

    (4)设置 字体的字重:font-weight:bold/bolder/(100-900)

    (5)字体的大小:font-size:

    font顺序应该按照font-style;font-variant; font-weight; font-size;font-family

    设置元素的文本属性

    (1)设置文本首行缩进:text-indent:1em

    (2)设置文本对齐方式:text-align:left(right,center)

                                text-align:justity;两端对齐(只对英文有用)

    (3)设置文本的修饰:text-decoration:none(underline下划线,overline上划线,line-through删除线)

    (4)设置行高:line-height:数字,百分比

    (5)设置间距:word-spacing:1em——单词与单词之间的距离(针对英文有效)

                        letter-spacing:1em——文字与文字之间的距离(针对中文有效)

    (6)英文大小写的转换:text-transform:capitalize   单词首字母大写
                        text-transform: uppercase:全部字母大写
                     text-transform:lowercase:全部字母小写 
                                                           
    设置段落样式    

    1.透明度 opacity:属性值;    范围是(0-1)  
    2.background-image:url(路径);
    3 background-repeat平铺 no repeat不平铺
     background-repeat: repeat-x;水平平铺
     background-repeat: repeat-y;垂直平铺
    4.若设置图片居中
    background-position:left center;左居中
     background-position:right center;右居中
     background-position: top center;上面居中
     background-position: bottom center;底部居中
    5.渐变
    首先用1k即1px的纯色图片,
    再用 background-image:url(路径);100px 1oopx no-repeat;
                                           

  • 相关阅读:
    跨域请求携带cookie
    vue单文件组件实例1:简单单文件组件
    vue单文件组件实例2:简单单文件组件
    vue路由1:基本使用
    项目中常用的javascript/jquery操作
    vue计算属性和侦听器
    专题8:javascript中事件
    普通文件的上传(表单上传和ajax文件异步上传)
    python导入包出错:ImportError: No module named XXXXX

  • 原文地址:https://www.cnblogs.com/alicezq/p/4752759.html
Copyright © 2011-2022 走看看