whenever i try to do something in CSS
that is not trivial people advice to use JQuery
. So开发者_如何学编程 i am puzzled that is it worth going into the details of CSS
or going into those drafts of W3C
when everything can be done with JQuery
?
If somebody tells you that jQuery is an alternative to CSS, disregard their opinion. jQuery makes heavy use of CSS to do its magic. Learn both jQuery and CSS, and your knowledge of one will always compliment your use of the other.
You can't really style anything with jQuery. jQuery simply applies CSS styles, and makes it much easier to do so in some cases.
You still need a solid understanding of CSS in order to style using jQuery. "everything can be done with JQuery
" is unfortunately not true. Also keep in mind users without JavaScript support.
Whoa there! The principles of seperation still stand to this day, that is
- CSS for styles
- HTML for meaning/semantics
- Javascript for client-side functionality
JQuery has not replaced anything, rather it gives you a more robust framework with which to manipulate the DOM. You absolutely need a fundamental understanding of those three before you can fully utilize what JQuery gives you.
yes, absolutely... the more css you use, the faster your page will be, also, jquery isn't run until after the page is loaded, and jquery's style handling is almost exactly like css declarations
CSS is very important to learn. You don't want to rely on JavaScript to style anything if you can help it. CSS will render faster by default than JS will and if you get a JavaScript error then your site will suddenly not be styled...depending on how your code is organized.
The fastest displaying content will be HTML content your server puts in the page that is styled with external CSS stylesheets. You should generally only use jQuery for handling dynamic behavior (adding, removing, moving, responding to events, hiding, showing, querying servers, etc...).
Even when using jQuery, I find that code is most readable and maintainable and more accessible by web designers if I use jQuery to add/remove classes and all the actual styling is in a CSS stylesheet.
The best practice on the web will put most style information in cacheable CSS stylesheets, even if heavily using jQuery for dynamic behavior.
Jquery has nothing to do with CSS, CSS is one of the three fundamentals to web developement, the rest being HTML and JavaScript.
CSS, cascading style sheet is being used to style a webpage, while jquery, a supposed JS library is used to dynamically alter the changes in the webpage.
The three fundamental stacks are a must for every web developer.
精彩评论