CSS3 – Interview Questions

CSS3 Logo

READ Frequently asked interview coding questions in BigTech companies like Facebook, Amazon and Google:

READ : Coding Challenge – Bracket Validator

READ : Coding Challenge – Three Sum Target. Find a triplet that sum to a given target value

 

1. What is the difference between CSS and CSS3 ?

 
CSS is used to control the style and layout of Web pages CSS3 is the latest standard for CSS. Whereas CSS3 is split up into “modules”.
 
The old specification has been split into smaller pieces, and new ones are also added.
 
Some of the most important CSS3 modules are:
Selectors
Box Model

Backgrounds and Borders
Text Effects
2D/3D Transformations
Animations
Multiple Column Layout
User Interface
 

2. How is multiple background images handled in CSS3?

 
CSS3 allows you to use several background images for an element.
Set two background images for the body element:
 
background-image:url(img_flwr.gif),url(img_tree.gif);
 

3) What new futures added in CSS3 for Borders?

 
Adding rounded corners in CSS2 was tricky. We had to use different images for each corner.
In CSS3, creating rounded corners is easy.
In CSS3, the border-radius property is used to create rounded corners:
 
Sample CSS3 code :
 
Add rounded corners to a div element:
div {
  border:2px solid;
  border-radius:25px;
  -moz-border-radius:25px; /* Firefox 3.6 and earlier */
}