css 笔记
第一种:常用的全局CSS属性设置 //参考大型网站,如凤凰网(1)清除所有的标记的内外边距body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0}(2)项目符号ul,ol,li{list-style:none;}(3)全局字体颜色设置body{font-size:12px;color:#444;}(4)常用标题的设置h1,h2,h3,h4,h5,h6{font-size:100%}h1{padding:11px 0 0; margin-bottom:4px;font:normal 20px/30px 黑体;text-align:center;}h2 { padding:6px 0 0; margin-bottom:4px; font:normal 20px/30px 黑体; text-align:center; }h3{font-size:12px}h4{font-size:12px;font-weight:normal}(5)全局链接a{text-decoration:none;cursor:pointer}a:link, a:visited {color:#004276}a:hover{text-decoration:underline;color:#ba2636}(6)图片img{border:none;} ie6 图片有边框,兼容性问题,要去边框(7)浮动和清除.float1{float:left;}.float2{float:right}.clear{clear:both;}.blank10{height:10px;clear:both;} 添加空白div 解决 div margin 上下边距会合并,兼容性问题(8)颜色.red{color:#FF0000;}.blue{color:#0000FF;}.green{color:#00ff00;}安装IETEST 测试 ie 6 (1)ie5网页居中 IE5下的居中,应该是:body{text-align:center} 加上这个,再在最大的div加{text-align:left;} Firefox下的居中,应该是:margin:0px auto; body{text-align:center;} .box{ margin:0 auto; text-align:left;} <body> <div class="box"> xx xx xx </div> </body> (2)单行内容垂直中齐 Div{height:80px;line-height:80px;} (3)IE中元素浮动时,margin左右加倍的问题 解决办法:Display:inline; margin:0 auto; ie6还是不行 问题被 (1)解决margin 左右边距在Ie6下会加倍,上下边距会合并,兼容性问题上下边距会合并,在中间加 div{height:10px;}.div1{width:200px;height:200px;background-color:#0000FF;margin:50px;float:left; display:inline;} //第一个div 的 display为行内样式 解决"margin 左右边距在Ie6下会加倍".div2{width:200px;height:200px;background-color:#0000FF;margin:50px;float:left;}<body><div class="div1"></div><div class="div2"></div> (4)实现1px高度的<div>在IE6下解决办法:overflow:hidden; //超出1px外的部分全部隐藏掉<div style="width:100px; height:1px; overflow:hidden;"></div> //超出的部分隐藏掉

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6
Visual web development tools
