Friday 29 May 2020

CSS3 interview questions and answers for experienced

css3 interview questions and answers for experienced



Question: How to write conditional statement in CSS?
<!--[if IE 7]>
<style type="text/css">
div.abc {                 
    background-color:red;
}
</style>
<![endif]-->



Question: How to write styles for all html elements of the same type?
Use tag name to write the CSS.
See Example
h1{font-size:18px;}
h2{font-size:17px;}
h3{font-size:16px;}
h4{font-size:15px;}



Question: What are different vaules of position attributes?
absolute
fixed
inherit
relative
static


Question: How to display a link without underline using CSS?
 a{
    text-decoration:none;
}



Question: How to display a link without underline when mouseover on the link using CSS?
 a:hover{
    text-decoration:none;
}



Question: How to page break after an html element in CSS?
<div style="page-break-after: always;">
Web Technology Experts Notes</div>



Question: What is the default value of "position" attribute in css?
static


Question: How we can specify more than one css class for any HTML element?
<div class="class1 class2">
Web technology experts Notes</div>




Question: Is CSS case sensitive?
No


Question: What is ID selector?
ID selector is an individually identified selector to which a specific style is declared.



Question: How to set wait cursor?
div.click{
    cursor:wait;
}




Question: What is Tweening ?
It process of generating intermediate frames between two images to give the appearance that the first image evolves smoothly into the second image.

Question: What are Child Selectors?
A child selector is used when you want to match an element that is the child of another specific element.
div.abc > ul {font-weight: bold;}



Question: What are different ways to apply styles to a Web page
Inline
Embedded
Linked
Imported



Question: What is contextual selector
Contextual selector addresses specific occurrence of an element.




Question: How to disable text selection highlighting with CSS?
.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

Add the .noselect to the html tag