Navigation bar switching effects:
The html code is as follows:
aaaa
bbbb
cccc
css style code As follows:
ul, li, p { padding: 0; margin: 0; } ul li { float: left; width: 100px; height: 30px; line-height: 30px; text-align: center; background-color: #fff; border: 1px #bbb solid; border-bottom: none; cursor: pointer; } ul li.fli { background-color: #ccc; color: red; } ul { overflow: hidden; zoom: 1; list-style-type: none; } #tab_con { width: 304px; height: 200px; } #tab_con p { width: 304px; height: 200px; display: none; border: 1px #bbb solid; border-top: none; } #tab_con p.fp { display: block; background-color: #ccc; } .tclass{ width: 100px; height: 30px; background: #000; }
js code is as follows:
The above is the detailed content of How to achieve the switching effect of tab bar. For more information, please follow other related articles on the PHP Chinese website!