Suppose there are four options: a accounted for 10%,b 20%, C accounted for 30%, D accounted for 40%, the principle is now to obtain a random number, and then find the interval.Of course, the number of options can be arbitrary. The default is now the
Most of the data displayed in the background of the website is closely related to this plugin:Let's use this little box:A code inside the HTMLHTML>This div is the data that you put in the presentation -DivID= ' demo '>Div>HTML>Not yet the small
The index () method of jquery searches for a matching element and returns the index value of the corresponding element, counting from 0.If you do not pass a parameter to the. Index () method, the return value is the position of the first element in
If you use Google search Flexbox, you will find a lot of outdated information. This will tell you how to quickly identify the information you need.If you are looking for blog information about Flexbox, you see "display:box;" or the "box-{*}"
Perhaps when you use jquery mobile, you will often see the use of Data-role, Data-theme, and so on, such as: The following code to achieve the effect of the header:[HTML] I am the title Why write a data-role= "header" can be achieved at the bottom
Selector Selector
Example
Example Description
CSS
. class
. intro
Select all elements of class= "Intro".
1
#ID
#firstname
Select all elements of id= "FirstName".
1
varMyDate =NewDate (); Mydate.getyear (); //get Current year (2-bit)Mydate.getfullyear ();//Get the full year (4-bit, 1970-????)Mydate.getmonth ();//Get the current month (0-11, 0 for January)Mydate.getdate ();//get current day (1-31)Mydate.getday ()
CSS formatting-typography-fontsBody{font-family: "The song Body";}body{font-family: "Microsoft Yahei";}Be careful not to set fonts that are not commonly used, because the default font is displayed if the font you set is not installed on the user's
Factory mode
Unify the creation and return of the object (instance) of the class.2. Single caseAvoid instantiating objects multiple times in one life cycle3. StrategyAll policies implement a unified interface, depending on the scenario, using
The simplest method to make videos responsive-Fitvids and video fitvids
Currently, the simplest way to make videos responsive is to use a small JQuery plug-in named -- FitVids.
URL: http://fitvidsjs.com/
After the download, import the js Code as
Analysis of the significance and design skills of 404 page, analysis of 404 page skills
Recently, I started to operate a website and found that the design of the 404 page is very important. Now many websites may search for 404 pages (the pages of
JQuery application (3) jQuery chain and jquery Application
In the previous example, the jQuery statement can be linked together, which not only shortens the code length, but also achieves special effects in many cases.
The code above adds the
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