html 3

div{}

#id{

}

.class_name{

}

 

CSS引入方式

1. 写在标签内部的 style=" " 属性里

2. 写在<head>部分中的<style type="text/css"></style>

3. 写在<link type="text/css" rel="stylesheel" href="xxxxx.css" />

4. 在<style></style>中使用 @import url(**.css); 导入 CSS 别烧了分号!!!!!

 

元素标签 并排在一行 使用 float CSS 属性  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
    <style>
        #header{
            height:200px;
            background:blue;
            color:white;
            float:left;
        }
        #content{
            height:200px;
            background:green;
            color:white;
            float:left;
        }
        #footer{
            height:200px;
            background:grey;
        }
    </style>
</head>
<body>
        <div id="header">Header</div>
        <div id="content">Content</div>
        <div id="footer">Footer</div>
</body>
</html>

 

 

html 3,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。