The syntax is much simpler than javascript,css, mainly dealing with annotations, strings, CSS style names, CSS style values, indenting, and wrapping, see code for details.
javascript implementation CSS code highlighting body{font-size:12
DIV+CSS+JS analog tab, I this version, theoretically can add unlimited tab, and, you just tube content added line, do not need to change JS
Of course, you have to be a div.
div+css+js analog tab box 1111 box 2222 Box 3333 Box 4444
In the trigger JS scroll event Ah, but I met is really not moving, I began to think it is FF above, did not think IE6 and IE7 have such effects, have to Marvel magic.
As I have found the following magic code: only the use of CSS to achieve scrolling
1. Transparency:If you don't specify a background color or a background image for a text, the background of the element is usually transparent.This is important, if an absolutely positioned and text element is placed on top of a text element, it
"Clear Demand"
The Web page loads the style sheet default.css, showing the default style. At the same time to achieve a variety of styles, the production of skin1.css,skin2.css,skin3.css three custom styles. If you load a default.css and then load
Visibility: Toggles the element visibility while maintaining the position and space of the element in the normal stream. It has two values: visible (Default) and hidden (not visible),
For example:
Copy Code code as follows:
hello john,
For example: elem.style.height or elem.style.height = ' 100px ', it is important to note that any geometry attribute must be set to the specified size unit (such as PX), and that any geometry property returns a string representing the style rather
The CSS () method sets or returns one or more style properties of the selected element.
Set CSS Properties
To set the CSS properties you specify, use the following syntax:
Copy Code code as follows:
CSS ("propertyname", "value");
Effect Chart:
Demo Code
js+css completed the website's member photo information display effect star Netizen Excellent circle main 01 Watery years 25 years old • Hubei Wuhan Popular:1243178 01 Water time 25 age •
We are browsing some websites, especially some novel websites, there will be a change in the background color of the page, this feature using jquery is easy to implement.
Effect Chart:
Show your code:
Copy Code code as follows:
We often use JavaScript to change the style of page elements. One way to do this is to change the CSS class (class) of page elements, which in traditional JavaScript is usually done by handling the classname features of the HTML DOM, and jquery
Recently in the framework of writing projects, write a Jquerymessagebox class, to use the JQuery UI dialog () to display the message box, in order to make the method easy to invoke, it is added to automatically determine whether the page is joined
Recently looked at a website, found that the display of different resolution, style file calls are not the same, today wrote an example to study,
Copy Code code as follows:
Untitled Document
In the development of Web projects, JS,CSS files will become more and more with the development of the project, which brings some problems to the performance, such as the more JS,CSS the page introduced, then to increase the number of HTTP requests,
Art to do the CSS style icon more and more, hand to write icon name is almost impossible to achieve. So there is this function point: the CSS style of all the icon class enumerated in a graphical format for the configuration of the selection of
Change the page element style using JavaScript can also be achieved, but there is no more concise way, the answer is yes, now have jquery, it seems that the JS code to thin a lot of, fulfilled the sentence: "jquery to make JavaScript code concise!" "
Such as:
Copy Code code as follows:
But what if CSS values are like this:
Copy Code code as follows:
The above obviously parseint () will be wrong, even if it is '. 5′ such a value, if replaced
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