Remove the dotted box on the link Copy code The code is as follows:a:active, a:focus { outline:none; } By default, Firefox will add a dotted border when a link is focused (or clicked), which can be removed using the above properties. The simplest CSS reset Copy code The code is as follows:* { margin: 0; padding: 0 } Do not wrap links Copy code The code is as follows:a { white-space:nowrap; } The above setting can avoid link wrapping, but I personally recommend that long links have a corresponding line (for discussion on line wrapping, see the record of the center of the circle). Always show scroll bars in Firefox Copy code The code is as follows:html { overflow:-moz-scrollbars-vertical; } More Mozilla/Firefox private CSS properties can be found here. Need cross-browser support, you can also use Copy code The code is as follows:body, html { min-height:101%; } Use line-height to center vertically line-height:24px; When using a fixed-width container and need to vertically center a line, use line-height (the height is the same as the parent container). For more vertical centering summary, see here. Clear container float Copy code The code is as follows:#main { overflow:hidden; } Centers a block element horizontally margin:0 auto; In fact, Copy code The code is as follows:margin-left: auto; margin-right: auto; This technique is explained in almost all CSS textbooks. Don't forget to add a width to it. You can also use it in Exploer Copy code The code is as follows:body{ text-align: center; } Then define the inner container text-align: left; recover. Hide the scroll bar of Exploer textarea Copy code The code is as follows:textarea { overflow:auto; } Exploer By default, textarea will have a vertical scrollbar (don't ask me why). Set print pagination Copy code The code is as follows:h2 { page-break-before:always; } The page-break-before attribute can set the paging when printing a web page. |
<<: JavaScript function call classic example code
>>: Detailed explanation of CSS label mode display property
Here is a case study on how to close ads using Ja...
Table of contents 1. Problem Background 2. What a...
This article shares the specific code of jQuery t...
01. Command Overview The seq command is used to g...
Many friends have asked in forums and message are...
I searched a lot online and found that many of th...
This article example shares the specific code of ...
1. Introduction Our real servers should not be di...
Preface The string types of MySQL database are CH...
This article shares the specific code of JavaScri...
Table of contents WXS Response Event Plan A Page ...
Table of contents Case 1: Case 2: Case 3: To summ...
Table of contents 1. Introduction: In this case, ...
The solution to the problem that Ubuntu 18.04 in ...
Dynamically implement a simple secondary menu Whe...