How JavaScript calls CSS properties.
1. JavaScript gets the style in the inline style
(1), margin, width, leftObj.style.marginObj.style.widthObj.style.left(2), Font-size,
We often see a lot of small icons on a page, but when we use the tools to open it, we find
These little icons are actually in a picture, how does this happen?
This is the use of CSS sprites cut graphics technology.
CSS sprites is actually the Web
First, the realization effect:
Note: This time the mouse has not moved into the red box, the contents of the red box is hidden
Note: The mouse is moved to the Red box area, the inside hidden things show up
Second, the CSS control specific code:
The field is too long for the page to display:
First, forced line break1 Word-break:break-all; Only works in English, with letters as the basis for line-wrapping.2 Word-wrap:break-word; Only works in English, with words as the basis for line change.
rem vs em
As the relative length unit of two, are based on a multiple relationship length, but the reference is not the same, here the case analysis of the difference between the two:1,em reference Multiples object is its own font size, font-size,
First specify the role
Specify what component this is by using. Base , for example:
. BTN indicates that the element is a button,. Progress indicates that the element is assigned a style to a progress bar
Assign a specified style to the component
Transferred from: http://blog.csdn.net/dante_k7/article/details/4605650
One problem today is that the width and Height properties do not work when you set a fixed width. Causes a background picture background:transparent URL to not display
CSS Layout--left adaptive parent element height
Ordinary items often encountered in the left navigation menu height is not fixed, need to be with the parent element or the right element, such as high situation, before the self-righteous use of JS
The -9999 PX Image replacement technology has been popular for the best part of a decade. To replace a text element and an image, you can use the following code:
this Text is replaced
The background of the element is displayed and its text is
1. Preface
jquery provides several ways to manipulate the CSS styles of DOM elements, including direct access to and modification of the class property values of DOM elements, as well as access to and modification of CSS property values in DOM
Overview: Css Sticky Footer
If the page content is not long enough, the footer block is pasted at the bottom of the window, and if the content is long enough, the footer block is pushed down by the content.
Implementation method:
Css Sticky
1. Change the page all
2. Eliminate links on the page dashed box3. Using CSS custom attribute expression to bulk define table row interval background4. Control the alignment of the tableDefine a pseudo-class in CSS:.
The use of text-overflow:ellipsis to overflow text display ellipsis has two advantages, one is not through the program to limit the number of words, the second is conducive to SEO. You need to use a list of article headings that display ellipses for
ie double margin bug, declared in the current style, _display:inline, this style only works in IE, the margin value disappears. IE does not know a:link, that is, a:link{color:red} has no effect, can be written directly a{color:red} and a:like{} have
Browser-compatible methods
Developers are basically aware that the development of CSS itself is not difficult, but when testing the code under different browsers, the difficulty arises. Browser bugs and inconsistent displays are a major challenge
The float property of CSS is to change the default display of block element objects: After the HTML tag has the Float property set, it will no longer occupy a single row, allowing multiple elements to be in the same row, so you need to clear the
This article is about how jquery and CSS3 implement the navigation bar to the bottom of the page (code), the content is very detailed, then we will look at the specific content, hope to help the needy friends.
Navigation bar
. navigation {
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