how to reset css to default settings

Posted in :

當 css 變的複雜的時候,會繼承到很多奇怪的 css 設定值,造成無法達成預設的效果,我遇到的情況是:

max-width: 100%

但套用這個設定值會讓圖片變小,我想修改成顯示原圖大小,並置右,解法如下:

.carousel .item img {
 float: right;
 max-width: initial;
}

這裡的 carousel 是直接修改 bootstrap 的 sample code.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *