Tip: You can modify some of the code before running
demo:: Vertical align:middle demo of middled vertical align Author:spenser Lee, Liberty studio Originally Posted on Blueidea Forum table of C entents: single line countainer
Automatic line feed of div textMethod 1, The code is as follows:Copy code 4545454545454545454454545445455454544545 llloioioiiioioioioioio You can add word-break: break-all IE to a non-normal field to force line breaks. However, line breaks are
Force do not wrapCSS settings do not change rows:Overflow: hidden hideWhite-space: normal defaultPre line breaks and other blank characters will be protectedNowrap forces all text to be displayed in the same row until the text ends or encounters a
When writing CSS styles, sometimes you may encounter difficult problems for the sake of appearance, such as flat water and vertical center, some horizontal and vertical center attributes are completely unresponsive. The following lists some ultimate
Let's talk about the beautification of custom CSS styles. I have been talking about comments for a while. Some styles seem awkward, so I just want to beautify it a little. How can I beautify it? There is a custom CSS in the personalized settings
Test results in E8 and later versions and most mainstream browsersHTML code The code is as follows:Copy code Style rules The code is as follows:Copy code . Img {Display: table-cell;Vertical-align: middle;Width: 400px; height:
I. Fixed-width layout of three columns The code is as follows:Copy code header Aside Main Content-aside footer # Header {width: 980px; height: 90px; margin: 0 auto; background: # f60 ;}# Container {width: 980px; margin: 0 auto ;}# Aside
To solve the offset problem, use two attributes: padding-top and maring-top.Padding-top is used to solve the offset between the anchor area and the top.Margin-top is used to solve the unnecessary offset generated by setting padding-top between the
The code is as follows:Copy code SolutionInline labels are represented as blocks without line breaks. They can only be displayed as follows: block in the old method and then float it.SolutionThe font-size: 0, and font-size: 12px are not
There are many use cases of high-level layout. Many times, in order to meet the requirements of a column's background or border, the height of the outer frame is the same, and is not affected by the dynamic change height of other columns. Generally,
First look at the effect chartBaidu News homepage solution: The code is as follows:Copy code ... The html structure is ugly, but css is simple.Sina Weibo homepage solution: The code is as follows:Copy code .... CSS: The code is as
The absolute position of the fixed element is relative to that of the HTML element. The scroll bar is the body element.Only by remembering this sentence can we know why position: absolute; results are given in many places, but they cannot be solved
Each segment contains two Chinese characters. In fact, 2em is indented in the first line. The code is as follows:Copy code to indent the first line of text in css, you only need to use text-indent. Length unit em. The font size relative to
Style Code, four attributes are required, and the width must be set on the current container. The specified width of the parent container is invalid: The code is as follows:Copy code . Box {Width: 200px;White-space: nowrap;Overflow:
In the standard browser, the rgba background is transparent, and IE can use a filter. The code is as follows:Copy code . Box {background: rgba (0.8, 90,); filter: progid: DXImageTransform. Microsoft. Gradient (startColorStr = # cc02205A,
The code is as follows:Copy code Html code 1-1 1-2 1-3 1-4 2-1 2-2 2-3 2-4 3-1 3-2 3-3 3-4 4-1 4-2 4-3 4-4 Through the following images and examples, we can easily find that using CSS is very easy to implement a table-like data
Style with the maximum widthBy changing "margin: 1em 5%" to "margin: 0", you can easily switch to the style of the maximum width. The code is as follows:Copy code # Container{ Margin: 0;/* changed from 1em 5% */Background-color: #
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service