zoukankan      html  css  js  c++  java
  • CSS

    通过3种方法在html中显示:

    1.内部嵌入式   <标签 样式属性名:样式属性值;样式属性名:样式属性值;>

    <html>

      <head><meta></head>

      <body>

        <div  style:"500px;hegth:300px;backgroud-color:#c4c4c4;backgroud-image:url('images/luzhishen.png');backgroud-repeat:no-repeat;">

        <div  style:"500px;hegth:300px;backgroud:#c4c4c4  url('images/luzhishen.png'  no-repeat;">

      </body>

    <html>

      

    2.定义内部潜入块对象

    <html>

      <head>

        <!--id选择器-->

        #myClass1{

            

                    500px;

          heghit:300px;

          backgroud-color:#c4c4c4;

          backgroud-image:url('images/luzhishen.png');

          backgroud-repeat:no-repeat;

            

        }

        <!--标签选择器-->

        span{

            font-size:50px;

            color:red;

        }

      <!--类选择器-->

      .myClass{

        color:green;

      }

      </head>

      <body>

        <div  id="myClass1"></div>

        <span>用户名不能为空</span>

        <a  class="">

        <ul>

          <li>...

      </body>

    </html>

    3.嵌入外部样式文件

    <html>

      <head>

          <link type=""  ref=”“ href="">

      </head>

    <body><div id=""></div>></body>

    -----------------------------------------

    设置边框颜色宽度样式

    <style type="css/text">  

     #myClass{   border:1px solid red;  }  

    </style>

    <div id="myClass"></div>

     设置鼠标移动效果

    span:hover

    {

       backgroud-color:yellow;

    }

     设置隐藏与显示

    div{

     display:none;  display:block;

    }

     设置字体大小

    <style>  

    div{   

       font-size:15px;  

     }

    </style>

    设置文本装饰

    <style>  

    a{   text-decoration:none;underline     }

    </style>

    设置列表样式:

    ul{

      list-style-type:none;

    其中还有crcle square upper-roman

    }

  • 相关阅读:
    排序算法之归并排序(Merge Sort)
    排序算法之选择排序
    [BUUCTF]REVERSE——firmware
    [BUUCTF]REVERSE——[WUSTCTF2020]Cr0ssfun
    [BUUCTF]PWN——hitcontraining_magicheap
    [BUUCTF]PWN——ciscn_2019_n_3
    [BUUCTF]PWN——[V&N2020 公开赛]easyTHeap
    [BUUCTF]PWN——babyfengshui_33c3_2016
    [BUUCTF]PWN——babyheap_0ctf_2017
    CTFHub[PWN技能树]——栈溢出
  • 原文地址:https://www.cnblogs.com/sunyuhuan/p/8400370.html
Copyright © 2011-2022 走看看