zoukankan      html  css  js  c++  java
  • HTML中使用CSS的方法

    行内样式表

    1 <html>
    2     <head>
    3           <title>行内样式表</title>
    4     </head>
    5     <body>
    6         <p style="color:blue;font-size:10px;">aaaaaaa</p>
    7     </body>
    8 </html>    

    内嵌样式表

     1 1 <html>
     2 2     <head>
     3 3           <title>内嵌样式表</title>
     4 4     </head>
     5       <style>
     6             p{
     7                   color:blue;
     8                   font-family:"宋体";
     9                }
    10       </style>
    11 5     <body>
    12 6         <p >aaaaaaa</p>
    13 7     </body>
    14 8 </html>    

    链接外部样式表

    one.css代码

    body{
          color:blue;
          font-size:10px;  
    }
    

     html代码

    <head>
        <link rel="stylesheet" href="one.css"  type="text/css">
    </head>
    

    导入外部样式表

    one.css代码

    body{
          color:blue;
          font-size:10px;  
    }
    

     html代码

    <head>
       <style type="text/css">
       @import "one.css"
       </style>
    </head>
    
  • 相关阅读:
    php 验证码
    扫描登录
    正则表达式
    liunx 搭建svn
    jq
    spl_autoload_register()函数
    php函数操作文件
    配置nginx支持TP框架
    Object-c 访问控制
    Obiective
  • 原文地址:https://www.cnblogs.com/Y-HKL/p/5244868.html
Copyright © 2011-2022 走看看