/*万能清除法*/
*{padding:0;margin:0;}
li{list-style: none;}
img{vertical-align:top;border: 0;}
a{text-decoration: none;}
.cl:after{content: "";display: block;clear: both;height: 0;overflow: hidden;visibility: hidden;}
.cl{zoom:1;}
/*外部样式*/
<link rel="stylesheet" href="../css/ .css">
/*初始化*/
body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,dd,input{padding: 0;margin: 0;}
li{list-style: none;}
a{text-decoration: none;}
img{vertical-align: top;border: 0;}
html{font-family: "微软雅黑";font-size: 12px;color: #333;}
.cl:after{content: "";display: block;clear: both;height: 0;overflow: hidden;visibility: hidden;}
.cl{zoom: 1;}
.fl{float: left;}
.fr{float: right;}
/*响应式布局*/
@media screen and (min-width: 320px) and (max-width: 480px){
body{}
}
@media screen and (min-width: 481px) and (max-width: 768px){
body{background-color: #ff0;}
}
@media screen and (min-width: 769px) and (max-width: 1200px){
body{background-color: #0f0;}
}
@media screen and (min-width: 1201px) {
body{background-color: #999;}
}
响应式初始化
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
/*去掉点击时的外边框*/
input:focus,textarea,select{outline: none;}
textarea{resize:none;}
button{cursor:pointer;}
/*伪类选择器 */
:nth-child(){}
:nth-of-type(1) 出现的次数
.a div:nth-child(2){color: red;}
.a p:nth-child(5){color: red;}
ul li:nth-child(even){}
ul li:nth-child(odd){}
ul li:first-child{}
ul li:last-child{}
/* 过渡*/
transition:s
/*html5格式*/
<header>
网页上面公共的头部
</header>
<div>
ssssss
</div>
<footer>网页上面公共的底部</footer>
<nav>
<ul>
<li></li>
</ul>
</nav>
<section>区块</section>
<aside>侧边栏</aside>
<article>文章</article>
<mark>高亮显示(行内标签)</mark>
<canvas>画布</canvas>
<input type="text" list="a">
<datalist id="a">
<option value="111">
<option value="112">
<option value="113">
<option value="aa">
<option value="ad">
<option value="cc">
<option value="cr">
</datalist>
<!-- novalidate取消验证 -->
<form novalidate>
<!-- required必填字段 -->
<!-- autofocus自动获取焦点 -->
*<input type="number" required autofocus>
<input type="search">
<input type="range">
<input type="color">
<input type="date">
<input type="email">
<input type="url">
<textarea name="" id="" cols="30" rows="10"></textarea>
<input type="submit">
<button type="submit"></button>
</form>
<!-- video必须添加自动播放属性 -->
<!-- 网页所支持的视频格式 webm/ogg/mp4 -->
<!-- loop循环播放 -->
<video src="../video/movie.webm" autoplay controls>对不起,你的浏览器版本太低,</video>
<audio src="../video/zhoujie.mp3" autoplay loop></audio>
/*列表*/
.t{width: 100%;height: 400px;border:1px solid red;border-collapse:collapse;table-layout:fixed;}
.t th,td{border: 1px solid red;}
<table class="t" cellspacing="0" cellpadding="0">
<caption>课程表</caption>
<thead>
<tr>
<th class="a1">aaaaaaaaaaaaaaaaaaaaa</th>
<th>星期一</th>
<th>星期一</th>
<th>星期一</th>
<th>星期一</th>
</tr>
</thead>
<tbody>
<tr>
<td>111</td>
<td>111</td>
<td>111</td>
<td>111</td>
<td>111</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>111</td>
<td>111</td>
<td>111</td>
<td>111</td>
<td>111</td>
</tr>
</tfoot>
</table>
第一种
<table width="624" height="362" bgcolor="#eeeeee" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="pink">
<tr align="center">
<td valign="bottom" width="101">会员姓名</td>
<td width="205">111</td>
<td width="103">111</td>
<td width="205">111</td>
</tr>
<tr align="center">
<td> </td>
<td colspan="3"></td>
</tr>
<tr align="center">
<td>111</td>
<td colspan="3"></td>
</tr>
</table>
第二种
.t{width: 100%;height: 400px;border:1px solid red;border-collapse:collapse;table-layout:fixed;}
.t th,td{border: 1px solid red;}
<table class="t" cellspacing="0" cellpadding="0">
<caption>课程表</caption>
<thead>
<tr>
<th class="a1">aaaaaaaaaaaaaaaaaaaaa</th>
<th>星期一</th>
<th>星期一</th>
<th>星期一</th>
<th>星期一</th>
</tr>
</thead>
<tbody>
<tr>
<td>111</td>
<td>111</td>
<td>111</td>
<td>111</td>
<td>111</td>
</tr>
</tbody>
</table>
- PC端和移动APP端CSS样式初始化
CSS样式初始化分为PC端和移动APP端 1.PC端:使用Normalize.css Normalize.css是一种CSS reset的替代方案. 我们创造normalize.css有下面这几个目的 ...
- pc端样式初始化
pc端样式初始化: /* http://meyerweb.com/eric/tools/css/reset/ /* http://meyerweb.com/eric/tools/css/reset/ ...
- HTML5样式和列表、CSS链接的四种状态
一.HTML5样式 1.标签: <style>:样式定义: <link>:资源引用: 2.属性: type="text/css":引入文档类型: rel=& ...
- css样式初始化
不同的浏览器对有些标签的默认显示是不同的,对css样式初始化可以实现样式的统一,消除不同浏览器间页面显示的差异性... 一般初始化方式为:*{margin:0:padding:0:}
- 一天搞定CSS: 标签样式初始化(CSS reset)及淘宝样式初始化代码--09
样式初始化:是指对HTML中某些标签的默认样式进行清除 样式初始化目的: 不同浏览器的默认样式不一样,若不清理,会导致相同的代码在浏览器中解析结果不一样,为了避免这种情况,所以需要进行样式初始化. 代 ...
- 样式初始化(copy)
css样式初始化reset文件 pc端 移动端 公共样式 1.pc端 /* normalize.css */ html { line-height: 1.15; /* 1 */ -ms-text-si ...
- HTML5样式、链接和表格
-------------------siwuxie095 HTML5 样式 1.标签 <style> 标签:样式定义 <link> 标签:资源引用 2.属性 rel:用于指定 ...
- 2017-11-29 HTML5样式、链接和表格
HTML5样式.链接和表格HTML5列表<ol> 有序列表<ul> 无序列表<li> 列表项 <dl> 列表<dt> 列表项<dd&g ...
- CSS样式初始化代码
CSS样式初始化代码 为什么要初始化CSS? 建站老手都知道,这是为了考虑到浏览器的兼容问题,其实不同浏览器对有些标签的默认值是不同的,如果没对CSS初始化往往会出现浏览器之间的页面差异.当然,初始化 ...
随机推荐
- css 文本属性和字体属性
1.将浮动居中 这需要三个盒子 <!DOCTYPE html> <html lang="en"> <head> <meta charset ...
- 如何使用jmockit进行单元测试
1. Jmockit简介 JMockit 是用以帮助开发人员编写测试程序的一组工具和API,它完全基于 Java 5 SE 的 java.lang.instrument 包开发,内部使用 ASM 库来 ...
- Flask框架之功能详解
1|0浏览目录 配置文件 路由系统 视图 请求相关 响应 模板渲染 session 闪现 中间件 蓝图(blueprint) 特殊装饰器 1|1配置文件 知识点 给你一个路径 "settin ...
- c# 第六节 c#的程序结构,以及vs的文件结构
本节内容: 1:c#的程序结构 2:深入了解vs的文件 1:c#的程序结构 实例: 2:深入了解vs的文件 三者的关系: 3:命令空间是什么 使用别名:
- UiPath:Delay延迟执行,解决UiPath自动输入值不完整问题
学习过程中出现点击按钮后,由于网页弹出框显示速度慢,造成输入值遗漏或者根本就没有输入问题. 查阅了一下,目前解决方法是在点击按钮后加一段延迟时间,等待他显示完整在输入值.如图 时间格式以秒为单位 00 ...
- Linux 怎样更改locale语言设置
推荐使用UTF8编码,因为这是国际标准,能兼容任何语言的编码.在CentOS VPS下修改语言编码: localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 export ...
- html 单元格合并
<table border="1" style={{margin:200}}> <tbody> <tr> <th colspan=&quo ...
- 跑批 - Spring Batch 批处理使用记录
根据spring官网文档提供的spring batch的demo进行小的测验 启动类与原springboot启动类无异 package com.example.batchprocessing; imp ...
- ABP 相关基础知识
好文章: https://www.cnblogs.com/1zhk/p/5268054.html 关键字:Internal 限定的是只有在同一程序集中可访问,可以跨类 关键字:volatile 一个变 ...
- [LeetCode] 536. Construct Binary Tree from String 从字符串创建二叉树
You need to construct a binary tree from a string consisting of parenthesis and integers. The whole ...