html div标签的简单应用
来源:互联网 发布:哪个行业的数据最值钱 编辑:程序博客网 时间:2024/04/29 17:57
div.html
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<script src="js/mui.min.js"></script>
<link href="css/mui.min.css" rel="stylesheet"/>
<link href="css/div.css" rel="stylesheet"/> <!--这里是链接到div.css文件-->
<script type="text/javascript" charset="UTF-8">
</script>
</head>
<body>
<div id="totaldiv">
<div class="main">
<ul id="list">
<li>
<span><a href="#">d1</a></li></span>
<li>
<span><a href="#">d2</a></li></span>
<li>
<span></span><a href="#">d3</a></li></span>
<li>
<span><a href="#">d4</a></li></span></ol>
</div>
<div class="c1">
<div id="test1">
<h2>嘿嘿</h2>
</div><div id="test2">
<h1>哼哼</h1>
</div>
<div id="test3">
<h2>嘻嘻</h2>
</div>
<div id="test4">
<a href="#" onclick="return history.back()">返回</a>
</div>
</div>
<div id="foot" >
<h3 align="center">黄鹤楼</h3>
<p>白日依山尽, 黄河入海流
<br>欲穷千里目,更上一层楼。
</p>
</div>
</body>
</html>
div.css
#totaldiv{
width: 800px;
margin: 0px auto;
padding: 10px;
background: #FF0000;
float: left;
clear: both;
}
#d1{
width: 40px;
background: #F2DEDE;
float: left;
clear: both;
padding: 1px;
}
#d2{
width: 40px;
background: #0088BB;
float: left;
clear: both;
padding: 1px;
}
#d3{
width: 40px;
background: #985F0D;
float: left;
clear: both;
padding: 1px;
}
#d4{
width: 40px;
background: #31708F;
float: left;
clear: both;
padding: 1px;
}
a{
text-decoration: none;
overflow: auto;
}
#list{
list-style: none;
float: left;
clear: both;
display:block;
}
//使d1 d2 d3 d4水平显示
.main ul li{
width:48%;
height:350px;
overflow:hidden;
margin-bottom:50px;
display:inline;
}
#test1{
width: 200px;
height: 60px;
padding: 10px;
margin-top: 20px;
background: #FFFF00;
float: left;
clear: both;
}
#test2{
width: 200px;
height: 60px;
padding: 10px;
margin-top: 20px;
background: #F2DEDE;
float: left;
clear: both;
}
.c1{
margin: 0px auto;
padding: 30px;
}
#test3{
width: 200px;
height: 60px;
padding: 10px;
margin-top: 20px;
background: #0088BB;
float: left;
clear: both;
}
#test4{
width: 100px;
padding: 10px;
float: left;
margin-top: 20px;
clear: both;
padding: 28px;
}
h1,h2,h3,h4,h5,h6{
margin: 0px auto;
padding: 30px;
font-family: "微软雅黑";
font-size: larger;
}
#foot{
margin-top: 20px;
font-family: "微软雅黑";
background: #0088BB;
float: left;
margin: 25px;
clear: both;
}
效果如图所示
- html div标签的简单应用
- HTML的div标签
- html中的div标签的含义和应用
- html中的div标签的含义和应用
- html中的div标签的含义和应用
- html div标签以及background-position偏移量的应用
- 简单的html标签
- 简单的html标签
- 简单的HTML-DIV切换
- HTML中<div>标签的一个简单的使用和介绍
- html中的div标签的含义
- HTML标签p和div的不同
- HTML <div> 标签的 align 属性
- HTML <div> 标签的 align 属性
- 简单的html标签转义
- 常用的简单html标签
- 简单的HTML标签学习
- HTML 简介及简单的html标签
- Linux内核
- Swift-for循环--与OC中的比较
- javaEE
- 17-maven插件-mojo标注和参数
- TOMCAT源码分析——SESSION管理分析(下)
- html div标签的简单应用
- 前端相关技术交流网址
- “另类”计算IP地址和子网划分
- 哈夫曼树及哈夫曼编码Java实现
- 项目在Linux上部署
- Eclipse中进行web project开发时遇到httperror 500 错误 jsp support not configured 问题的解决方法
- DOM 的基本操作
- Linux文件默认权限(umask)的修改/特殊权限/细部权限规划(ACL)
- android 一些权限介绍