+ 1
Can we use Javascript instead of CSS?
6 Respostas
+ 7
You can use JS instead of CSS just like you could use a pencil instead of a paint roller to paint a house. Technically its possible, but you shouldn't do it.
+ 4
yes but you'll more than likely end up using <style></style>
+ 2
JavaScript is for validation & CSS is purely for styles i hope, we can use CSS in JS but can't use CSS instead of JS.
+ 2
CSS is presentation of web and JavaScript is behavior of web.
0
well. you can access CSS styles thought JS but it will take twice as much code to do the same thing.
But theoretically, yes. DOM Elements have a style object that allows you to access all the properties that can be used in CSS
For example
Document.GetElementById ("ElementId").Style.propertyOfChoise = value;
- 1
yes you can use canvas and svg