In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the differences between css and jquery, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Differences: 1, css is a computer language used to represent file styles such as HTML or XML, while jquery is a set of cross-browser JavaScript code base; 2, CSS selects an element to set a style for the element, and jQuery selects an element to add behavior for the element.
The operating environment of this tutorial: windows10 system, jquery3.2.1 version, Dell G3 computer.
What are the differences between css and jquery
JQuery
JQuery is a fast and concise JavaScript framework, and it is another excellent JavaScript code base (or JavaScript framework) after Prototype. JQuery is designed to be "write Less,Do More", which advocates writing less code and doing more. It encapsulates the common functional code of JavaScript, provides a simple JavaScript design pattern, and optimizes HTML document operation, event handling, animation design and Ajax interaction.
The core features of jQuery can be summarized as follows: unique chain syntax and short and clear multi-function interface; efficient and flexible css selector, which can be extended to CSS selector; convenient plug-in extension mechanism and rich plug-ins. JQuery is compatible with a variety of mainstream browsers, such as IE 6.0 +, FF 1.5 +, Safari 2.0 +, Opera 9.0 + and so on.
CSS (cascading style sheets)
Cascading style sheet (English full name: Cascading Style Sheets) is a computer language used to represent file styles such as HTML (an application of standard general markup language) or XML (a subset of standard general markup language). CSS can not only modify the web page statically, but also format the elements of the web page dynamically with various scripting languages.
CSS can accurately control the layout of elements in a web page at the pixel level, support almost all font size styles, and have the ability to edit web objects and model styles.
The difference between CSS selector and jQuery selector
We know that the writing of jQuery selector and CSS selector is very similar, both have the characteristics of implicit iteration, there is no need to loop through every element that meets the requirements of the selector, so it is relatively easy to use. In general, wrapping the css selector with $("") becomes a jQuery selector, such as
So what's the difference between the two?
1. But the functions of the two are different. After finding the element, the CSS selector sets the style of the element, and the jQuery selector finds the element and adds the behavior.
2. JQuery selector has better cross-browser compatibility.
3. The efficiency of the selector.
Efficiency of CSS selector
Id selector (# myid)
Class selector (.myclassname)
Tag selector (div,h2,p)
Adjacent selector (h ~ 2 _ selecp)
Sub-selector (ul > li)
Descendant selector (li a)
Wildcard selector (*)
Property selector (a rel = "external"])
Pseudo-class selector (aVRV hover.livnthmurchild)
The efficiency of the above nine selectors is from high to low, of which the efficiency of the ID selector is the highest and that of the pseudo-class selector is the lowest.
Efficiency of jQuery selector
Id selector KaTeX parse error: Expected 'EOF', got' #'at position 3: ('# id') and element tag selector ('form')
Class Selector $('.className')
Attribute selector ('[attribute=value]') and pseudo-class selector ('[attribute=value]') and pseudo-class selector ('[attribute=value]') and pseudo-class selector (': hidden')
Thank you for reading this article carefully. I hope the article "what is the difference between css and jquery" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.