+ 1
Why in id you use #{} in css. and in class you use .{) in css?
3 Respostas
+ 3
Because that is how you tell the browser whether you're selecting a class or an id to modify. Without either, the browser would assume you were selecting an element type like "p" or "body". The "." for class names and "#" for id names is just an arbitrary notation that people decided upon to differentiate between ID, class, and type selectors.
0
.class reference the name within the class .Meanwhile #id keeps a unique identity on other hand . is not used in id because id are mostly called in Javascript...Javascript uses . to call id due to been a Object Orient Script
0
because it's the Css syntax