January 30, 2008

CSS 筆記

CSS 筆記


目錄


CSS Property 筆記

overflow

MDN, w3schools

The overflow CSS property specifies whether to clip content, render scrollbars or just display content when it overflows its block level container.


其他

opacity:0 / visibility: hidden / display:none

What is the difference between visibility:hidden and display:none

Collapses 的範例:

test | <span style="[style-tag-value]">1234567890</span> | test
  • display:none results in: test | | test
  • visibility:hidden results in:test | (&nbsp of 10 chars) | test

Does opacity:0 have exactly the same effect as visibility:hidden

  • Collapses: collapses the space that the element would normally occupy
  • Events: Responds to events (e.g., click, keypress)
  • Taborder: Participates in the taborder
Type collapse events taborder
opacity: 0 No Yes Yes
visibility: hidden No No No
visibility: collapse (note) No No
display: none Yes No No

(note): Yes if inside a table element, otherwise No.