好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

H5学习之旅-H5的样式(5)

样式的引入方式

外部样式表

link rel = “stylesheet” type = “text/css” href = “mystyle.css”

内部样式表

style type = “text/css” body { background-color:red} p{margin-left:20px} style

内联样式表

P style = “color:red”

代码实例

<!DOCTYPE html><html lang="en"><head>
    <meta charset="UTF-8">
    <title>H5样式</title>
    <link rel="stylesheet" type="text/css" href="myStyle.css">
    <style type="text/css">
        p{            color: blue;        }
    </style></head><body>
    <h1>标题1</h1>
    <p>欢迎刘朋</p>
    <a href="http://HdhCmsTestbaidu测试数据" style="color: chartreuse;">点击我跳转</a></body></html> 

效果图

样式的引入方式

外部样式表

link rel = “stylesheet” type = “text/css” href = “mystyle.css”

内部样式表

style type = “text/css” body { background-color:red} p{margin-left:20px} style

内联样式表

P style = “color:red”

代码实例

<!DOCTYPE html><html lang="en"><head>
    <meta charset="UTF-8">
    <title>H5样式</title>
    <link rel="stylesheet" type="text/css" href="myStyle.css">
    <style type="text/css">
        p{            color: blue;        }
    </style></head><body>
    <h1>标题1</h1>
    <p>欢迎刘朋</p>
    <a href="http://HdhCmsTestbaidu测试数据" style="color: chartreuse;">点击我跳转</a></body></html> 

效果图

以上就是H5学习之旅-H5的样式(5)的内容,更多相关内容请关注PHP中文网(HdhCmsTestgxlcms测试数据)!

查看更多关于H5学习之旅-H5的样式(5)的详细内容...

  阅读:43次