Now the Web page design is more popular using a large background image, then you know how to use a large background picture to stretch the effect? That is, using a fixed-size background image to stretch it in the page as the browser size, like our desktop wallpaper effect. This article will take you through the use of jquery and CSS to achieve a background picture stretching effect.
Stretch the backgroun
Dynamic Loading of js and css jquery plugin and jqueryplugin
A simple jquery code that dynamically loads js and css. It is used to load common js and css files through js functions when a page is generated.Java code
// How to use the function below:
// $. Include ('file/a
Dynamic Loading of js and css jquery plugin and jquerypluginA simple jquery code that dynamically loads js and css. It is used to load common js and css files through js functions when a page is generated.Java code
// How to use the function below:
// $. Include ('file/aj
JQuery Operations CSS
AddClass ()-add one or more classes to the selected element
Removeclass ()-deletes one or more classes from the selected element
Toggleclass ()-Toggle operation of the Add/Remove class to the selected element
CSS ()-Sets or returns one or more style properties for the selected element.
JQuer
Style operations. CSS () and element data storage.1. The CSS () method is used to get the calculated value of the element style property or to set the element's CSS properties2. CSS () 2 ways to get the calculated value of an element style attribute. CSS (PropertyName) Gets
Loading CSS dynamically in JS is of great significance in the UI for changing themes. You can choose your preferred page display mode based on your browsing habits. There are three main methods for loading CSS dynamically, the following is a detailed description. If you have many associated CSS files to be loaded together, or want to dynamically load different
$ (this). Click (function () {if ($ (this). Hasclass ("zxx_fri_on")) {$ (this). Removeclass ("zxx_fri_on");}else{$ (this). AddClass ("zxx_fri_on");}return false;});Add or remove a class name for an element collection1. Using the AddClass () methodAddClass (names) adds the names specified by one or more class name to wrapped set. If you have more than one name, separate them with spaces, in short names is a string.Returns the original wrapped set for the jque
Use jQuery and CSS to stretch the background image.
Nowadays, large background images are widely used in WEB page design. Do you know how to use a large background image for stretching? That is to say, a fixed-size background image is used to stretch the page with the browser size, just like our desktop wallpaper. This article will show you how to use jQuery and
The example of this article tells the JQUERY+CSS to achieve a very beautiful horizontal navigation menu effect. Share to everyone for your reference, specific as follows:
The screenshot of the running effect is as follows:
The background picture used is tab.gif as follows:
The specific code is as follows:
More interested readers of jquery-related
The jquery support method is used to manipulate CSS properties of HTML elementsThe following method provides a CSS action method for jquery:
AddClass () – adds one or more CSS classes to the specified element.
Removeclass () – Deletes one or more
$ (this). Click (function () {if ($ (this). Hasclass ("zxx_fri_on")) {$ (this). Removeclass ("zxx_fri_on");}else{$ (this). AddClass ("zxx_fri_on");}return false;});Add or remove a class name for an element collection1. Using the AddClass () methodAddClass (names) adds the names specified by one or more class name to wrapped set. If you have more than one name, separate them with spaces, in short names is a string.Returns the original wrapped set for the jque
One of the methods is to change the CSS Class of page elements. In traditional Javascript, we usually implement it by processing the classname feature of HTML Dom; jQuery provides three methods to implement this function. Although they share the same idea with traditional methods, they save a lot of code. -"JQuery makes JavaScript code concise !"1. addClass ()-ad
. CSS () method: Gets the calculated value of the element style property or sets the CSS property of the elementGet:
. CSS (PropertyName) : Gets the computed value of the style property of the first element in the matching element collection
. CSS (propertynames): Passing a set of arrays, returning an obj
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 provides three ways to do this. Although they are connected to traditional methods, they save a lot of code. Or the phrase-"jquery makes JavaScript code concise!" ”
1. AddClass ()-
Here, you will find 38 main jquery and CSS drop-down menus, downloadable files and descriptions, and multi-level menu tutorials.Here is my favorite pick-up box with a very unique navigation menu.Your Bookmarks have such a reference.ArticleIt is always good when you have to create a lot of content and menus for some real big websites-back here.The pre-made menu allows you to easily modify
technology, jquery is a well-packaged and lightweight JS library that is compatible with a wide variety of browsers, making it easier to design various dynamic effects on various elements of the page.And the two have an inseparable relationship: careful analysis found that in the JS design animation effect, many seemingly very complex effects, in fact, by setting the CSS style page elements to control. The
Class attribute Modification
Class attributes, which are class attributes, specify the name of the classes.When specifying a style with a class selector, you need to specify the class name, which is the value of the class attribute, for the element.Note that each HTML element has only one class attribute. But the value of the class attribute can be multiple names, which may contain a list of words, separated by spaces.See the specific use method: Http://www.w3school.com.cn/
style attribute variable "mycss", similar to creating an external CSS file, and then using the css () method, assign the property to the DIV with ID '# result.In addition, the css () method provided by jQuery can also view the css attribute values of an element. (Www.jb51.n
If you are looking for some cool drop-down menu solutions, you need. Today, I have collected some useful CSS and jquery drop-down menu solutions.Creating a pure CSS dropdown menu
Sexy drop down menu w/jquery CSS
Sliding jquery m
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.