zoukankan      html  css  js  c++  java
  • css基础

    css知识点:
      1.内嵌:他是内嵌在标签中
      注意不建议使用(因为他的级别最高)
      2.内联:他是写在head标签里面
      3.外部应用css文件(他也是在head标签里)
      写法link标签里

    选择器:
      1.标签选择器 span{}
      2.id选择器 #id{}
      3.class选择器 .class{}
      4.复合选择器
        并列  #id,#id
        后代选择器 #id .class
        筛选 class
        属性 input[属性="值"]
        通用样式:*{ margin:0px}
      优先级:内联样式
        id选择器
        class选择器
        标签选择器选择器
        通用格式

    伪类:
      a:link {color:#FF0000;} /* 未访问的链接 */
      a:visited {color:#00FF00;} /* 已访问的链接 */
      a:hover {color:#FF00FF;} /* 鼠标划过链接 */
      a:active {color:#0000FF;} /* 已选中的链接 */

    字体常用样式

     1   .demo4{
     2             font-size: 20px;/*字号*/
     3             font-family: "楷体";/*字体*/
     4             background: skyblue;/*背景色*/
     5             font-weight: bold;/*宽度*/
     6             font-style:italic; /*倾斜 */
     7             text-decoration: underline;/*下划线*/
     8             text-transform: capitalize;/*英文字母的大小写转化*/
     9             text-indent: 2em; /*首行缩进*/
    10             text-align: center;/*显示位置*/
    11             line-height:120px;/*行高度*/
    12         } 

      

    常用属性:

      

       !important:用于同级别的最高设置的属性 height:2px !inportant;

      border-radius:圆角。

      cursor:鼠标获取焦点是的样式。

      list-style-type: none; 取消列表黑点。

     

    注意:给div设置浮动时父级div不能自适应高度!!

  • 相关阅读:
    hadoop 2.x 简单实现wordCount
    httpClient连接超时设置
    Java io使用简介
    log4j使用教程
    F#中的自定义隐式转换
    Computation expressions and wrapper types
    Introducing 'bind'
    Understanding continuations
    Computation expressions: Introduction
    MySQL优化总结,百万级数据库优化方案
  • 原文地址:https://www.cnblogs.com/yanghaoyu0624/p/11274617.html
Copyright © 2011-2022 走看看