CSS visibility 灞炴


瀹炰緥

浣 <h2> 鍏冪礌涓嶅彲瑙侊細

h2
{
visibility:hidden;
}

灏濊瘯涓涓 禄

鍦ㄦ椤靛簳閮ㄦ湁鏇村鐨勪緥瀛愩

灞炴у畾涔夊強浣跨敤璇存槑

快三微信大小群—官方网址22270.COMvisibility灞炴ф寚瀹氫竴涓厓绱犳槸鍚︽槸鍙鐨勩

鎻愮ず:鍗充娇涓嶅彲瑙佺殑鍏冪礌涔熶細鍗犳嵁椤甸潰涓婄殑绌洪棿銆傝浣跨敤 "display" 灞炴ф潵鍒涘缓涓嶅崰鎹〉闈㈢┖闂寸殑涓嶅彲瑙佸厓绱犮

榛樿鍊硷細 visible
缁ф壙锛 yes
鐗堟湰锛 CSS2
JavaScript 璇硶锛 object.style.visibility="hidden"


娴忚鍣ㄦ敮鎸

Internet ExplorerFirefoxOperaGoogle ChromeSafari

鎵鏈変富娴佹祻瑙堝櫒閮芥敮鎸乿isibility灞炴с

娉ㄦ剰锛 锛欼nternet Explorer锛堝寘鎷琁E8锛夋病鏈夌増鏈敮鎸佸睘鎬у"inherit"鎴"collapse"銆


灞炴у

鎻忚堪
visible 快三微信大小群—官方网址22270.COM榛樿鍊笺傚厓绱犳槸鍙鐨勩
hidden 鍏冪礌鏄笉鍙鐨勩
collapse 褰撳湪琛ㄦ牸鍏冪礌涓娇鐢ㄦ椂锛屾鍊煎彲鍒犻櫎涓琛屾垨涓鍒楋紝浣嗘槸瀹冧笉浼氬奖鍝嶈〃鏍肩殑甯冨眬銆傝琛屾垨鍒楀崰鎹殑绌洪棿浼氱暀缁欏叾浠栧唴瀹逛娇鐢ㄣ傚鏋滄鍊艰鐢ㄥ湪鍏朵粬鐨勫厓绱犱笂锛屼細鍛堢幇涓 "hidden"銆
inherit 瑙勫畾搴旇浠庣埗鍏冪礌缁ф壙 visibility 灞炴х殑鍊笺


Examples

鏇村瀹炰緥

鎶婅〃鏍煎厓绱犺缃负collapse
鏈緥婕旂ず濡備綍浣胯〃鏍煎厓绱犲彔鍔犮


鐩稿叧鏂囩珷

CSS 鏁欑▼: CSS Display 鍜 visibility