Making Chrome-like tab resize with pure css

后端 未结 3 981
囚心锁ツ
囚心锁ツ 2021-01-13 23:34

I am trying to create tabs that resize a bit similar to how Chrome tabs does. But I am not sure how and if it is even possible to do without JavaScript.

I don\'t ca

3条回答
  •  猫巷女王i
    2021-01-14 00:15

    I improved on Duopixels anwer by using one extra element and display: table-cell instead of the flexbox implementation. This way you achieve better cross-browser support/fallback. http://jsfiddle.net/w34nm/ (Tested in IE8+, Firefox 10, Chrome 17)

    PS: you should probably use JavaScript to set the right width values on the list items

提交回复
热议问题