html css 美化模板,通用css样式,全局css样式,css样式模板,
编写一段时间的html网页,借鉴和总结了一些css样式,下面我把一些通用的css样式搬了过来,希望以后直接来搬去节省时间,虽然通用样式一讲得比较详细,但个人建议用后边的通用模板
通用样式01
@charset "utf-8";
/* ------------------------------------全局定义---------------------------------------- */
/* 将具有默认margin和padding的标记置零,所有标记的margin、padding都在使用时具体定义 */
*{ margin:0;padding:0;}
/* 修正IE5.x和IE6的斜体溢出bug */
* html body{ overflow:visible;}
* html iframe, * html frame{ overflow:auto;}
* html frameset{ overflow:hidden;}
/* 常用标签,基本标签默认样式取消,HTML标签,取消基本标签默认样式,防止不同浏览器显示效果不同,text-align:center; 解决不同浏览器居中问题 */
body{ color:#000; background:#FFF; font:12px/22px Verdana,Arial,sans-serif,"Times New Roman",宋体; text-align:center;}
body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div,tr{ margin:0; padding:0;}
input,select{ font-size:12px; vertical-align:middle;}
/* 设置内容左对齐,恢复因BODY设置剧中产生的继承 */
body div{ text-align:left;}
/* 标签属性,textarea,input 强制输入时内容超出时换行 */
textarea,input{ word-wrap:break-word; word-break:break-all; padding:0px;}
/* 清除ul列表标记的样式,ul列表更多的用在不需要列表前置符号的样式里 */
li{ list-style-type:none;}
/* 定义图片边框,当图片作为链接内容被填充时,会有默认边框出现,重定义掉 */
img{ border:0 none;}
/* 定义默认的链接样式,仅仅是作为默认样式提供,可以在各自的实例中覆盖掉 */
a:link, a:visited{ color:#04C; text-decoration:none;}
a:hover{ color:#F60; text-decoration:underline;}
/* 去掉链接的虚线框 */
a { outline:none; star:expression(this.onFocus=this.blur());}
/* 定义H系列标签,覆盖H系列标签默认属性 */
h1{ font-size:24px;}
h2{ font-size:20px;}
h3{ font-size:18px;}
h4{ font-size:16px;}
h5{ font-size:14px;}
h6{ font-size:12px;}
通用样式02
@charset "utf-8";
/* CSS Document */
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td {margin:0;padding:0;}
body, button, input, select, textarea {font:12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;}
h1, h2, h3, h4, h5, h6 {font-size:100%;}
address, cite, dfn, em, var {font-style:normal;}
code, kbd, pre, samp {font-family:courier new, courier, monospace;}
small {font-size:12px;}
ul, ol {list-style:none;}
a {text-decoration:none;}
a:hover {text-decoration:underline;}
sup {vertical-align:text-top;}
sub {vertical-align:text-bottom;}
legend {color:#000;}
fieldset, img {border:0;}
button, input, select, textarea {font-size:100%;}
table {border-collapse:collapse;border-spacing:0;}
通用样式03
@charset "utf-8";
/* CSS Document */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{ margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; text-decoration:none; }
:focus { outline: 0; }
table { border-collapse: separate; border-spacing: 0; }
caption, th, td { height:30px; font-weight: normal; }
a img, iframe { border: none; }
ol, ul { list-style: none; }
input, textarea, select, button { font-size: 100%; font-family: inherit; }
select { margin: inherit;}
body { font-size:12px; font-family:"宋体"; }
通用样式04
@charset "utf-8";
/* CSS Document */
*{padding:0;margin:0;}
div,dl,dt,dd,form,h1,h2,h3,h4,h5,h6,img,ol,ul,li,table,th,td,p,span,a{border:0;}
img,input{border:none;vertical-align:middle;}
body{font-family:Tahoma,Arial,Helvetica,"宋体";font-size:12px;background:#FFF;color:#212121;
line-height:30px; background:#e6e6e6;}
html{overflow-y:scroll;}
ul,ol{list-style-type:none;}
th,td,input{font-size:12px;}
h3{font-size:14px;}
button{border:none;cursor:pointer;font-size:12px;background-color:transparent;}
select{border-width:1px;_zoom:1;border-style:solid;padding-top:2px;font-size:12px;}
.clear{clear:both;font-size:1px;height:0;visibility:hidden;line-height:0;}
.clearfix:after{content:"";display:block;clear:both;}
.clearfix{zoom:1;}
a:link,a:visited{text-decoration:none;color:#333;}
a:hover,a:active{text-decoration:underline;color:#f60;}
html css 美化模板,通用css样式,全局css样式,css样式模板,相关推荐
- vue 组件不受全局样式影响_组件库引入全局样式lib/style/index.css,会污染全局基础样式...
I have searched the issues of this repository and believe that this is not a duplicate. Version 1.3. ...
- 10使用CSS美化页面
技术交流QQ群:1027579432,欢迎你的加入! 本教程来源于B站杨仕航Django2.0开发视频教程,如需转载,必须注明来源! 1.页面设计 2.导航栏设计 打开blog文件夹的urls.py文 ...
- easyui datagrid oncheck 修改行样式_100 种 PPT 图表样式送给你
你好,这里是诺灰屋 我是诺灰 距离上一篇推文,已有近一个月的时间没有给大家写推送了. 这期间,我一直在进行数据图表方面知识的网络调研.甚至于在知网上找了几篇论文来看,当然,内容很枯燥,不实用. 同时, ...
- 纯css美化滚动条样式
https://www.emperinter.info/2020/09/20/scrollbar-in-browser/ 自己完善自己博客再Ipad等移动端的菜单时选用了左右滑动的菜单模式!当然就会使 ...
- css改火狐滚动条样式_纯css美化滚动条样式
知乎的编辑器对于复制转发文章来说特别不友好(直接复制后代码乱码,字体变化,表格数据丢失),不太想过多重复编辑,只会编辑转发部分到这上面来,如感觉还不错,请跳转到:https://www.emperin ...
- css美化表格和表单样式
Css美化表格和表单样式 表格创建默认是没有边框的,我们要用boder属性去设置表格的边框 表格基本样式 表格边框合并boder-collapse 在显示表格时,通常来说表格都是有边框的,边框的作用: ...
- ace.css模板,4.2 引入ACE主题的CSS样式
# 引入ACE模版的CSS样式 ## 1. horizon\openstack_dashboard\themes\maintenance\static\bootstrap\_variables.scs ...
- html好看的搜索框样式,CSS美化的漂亮搜索框
CSS美化的漂亮搜索框 body{ font: normal 100% 'Arial','Helvetica','Verdana',sans-serif; color: #333; } p { pad ...
- html中样式里面有符号,css样式 + 特殊符号
color控制字体颜色 十六进制值 #cc0066: font-size控制字体大小 单位 px / % / em / rem:像素 / 相对于父级元素 / 取决自己使用字体大小 / 取决于根元素ht ...
- Vue.js使用CSS美化
网页的美化主要靠CSS.Vue.js也可以借助CSS实现更好的效果. 一.什么是CSS 这里就不介绍了.对开发者而言,所有的样式如果都需要手写是非常繁琐的,而且难度也非常的高,这时就该用到现有的开源U ...
最新文章
- 线下活动【西安站】用Leangoo做Scrum敏捷开发实战课(免费)
- WIN10 右键 powershell 修改
- 【LeetCode】687. 最长同值路径
- spark 2.x ML概念与应用
- zendframework配置篇
- mybatis crud_MyBatis教程– CRUD操作和映射关系–第1部分
- php有多少种占位符,php 占位符问题?
- Zabbix监控SQLServer TPS
- 20145309李昊《网络对抗》MSF应用基础
- 无意间发现BAT大佬总结的一份目标检测、卷积神经网络和OpenCV学习资料(教程/PPT/代码)...
- 文档丨Oracle数据库异构上云最佳实践
- 异常:Invalid character found in the request target. The valid characters are defined in RFC 3986
- 蓝桥杯 ALGO-67 算法训练 最大值与最小值的计算
- Python: 更改Jupyter Notebook默认工作路径?
- 【计算机网络笔记】数据链路层:点对点协议PPP
- UVA ~ 816 ~ Abbott's Revenge (BFS + 打印路径)
- java解指派问题,运用Excel规划求解解决指派问题
- 坐标求四面体体积_四面体体积公式
- ffmpeg录制音频 命令行与C++实现
- html网页如何在手机上实现,html和css结合实现手机端网页自适应的代码