You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css.html
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,12 @@
56
56
.element{
57
57
height:50px;
58
58
width:50px;
59
-
transition: width 2s linear 0.5s;
59
+
transition: width 2s linear 0.5s, background-color 2s linear 0.5s;
60
60
background-color: purple;
61
61
}
62
62
.element:hover {
63
63
width:100px;
64
+
background-color: red;
64
65
}
65
66
</style>
66
67
@@ -201,6 +202,7 @@ <h2>5. position</h2>
201
202
<h2>6. display vs visibility</h2>
202
203
<p><strong>Question:</strong> What are the differences between visibility hidden and display none?</p>
203
204
<p><strong>Answer:</strong><code>display:none</code> removes the element from the normal layout flow and allow other elements to fill in. <code>visibility:hidden</code> tag is rendered, it takes space in the normal flow but hides it.</p>
205
+
<p>if u want to say it smartly, <code>display:none</code> cuases DOM reflow where is <code>visibility:hidden</code> doesn't. btw, what is reflow? answer. sorry i wont tell you, google it.</p>
204
206
<p>ref: <ahref="http://www.vanseodesign.com/css/visibility-vs-display/">visibility vs Display</a></p>
205
207
</div>
206
208
<divid="http_request">
@@ -233,7 +235,7 @@ <h2>9. shadow DOM</h2>
233
235
<divid="semantic_html">
234
236
<h2>10. transition</h2>
235
237
<p><strong>Question:</strong> What do u know about tranisition 3D?</p>
236
-
<p><strong>Answer:</strong> transition allows to add an effect while changing from one style to another. You can set the which property you want to transition, duration, how u want to transit (linear, ease, ease-in, ease-out, cubic-bezier) and delay when transition will start.</p>
238
+
<p><strong>Answer:</strong> transition allows to add an effect while changing from one style to another. You can set the which property you want to transition, duration, how u want to transit (linear, ease, ease-in, ease-out, cubic-bezier) and delay when transition will start. you can transition more than one property by comma seperation</p>
transition: width 2s linear 0.5s, background-color 2s linear 0.5s;
247
250
}
248
251
249
252
.element:hover {
250
253
width: 100px;
254
+
background-color:red;
251
255
}
252
256
</code></pre>
257
+
<p>Hover over the purple box and wait.</p>
253
258
<divclass="element"></div>
259
+
<p><strong>Advanced:</strong> you can check transfrom: <ahref="http://www.sitepoint.com/advanced-css3-2d-and-3d-transform-techniques/">css 2D 3D transform</a>, <ahref="http://css3.bradshawenterprises.com/flip/">flip an image</a></p>
254
260
</div>
255
261
</div>
256
-
<p>ref: <ahref="http://blog.alexmaccaw.com/css-transitions">all you need to know about css transition</a>, <ahref="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_CSS_transitions">css transition</a><ahref="http://www.html5rocks.com/en/tutorials/3d/css/">transition and 3D</a></p>
262
+
<p>ref: <ahref="http://blog.alexmaccaw.com/css-transitions">all you need to know about css transition</a>, <ahref="http://css3.bradshawenterprises.com/transitions/">transition: tutorial</a>, <ahref="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_CSS_transitions">css transition</a>, <ahref="http://www.html5rocks.com/en/tutorials/3d/css/">transition and 3D</a></p>
0 commit comments