select元素中設定padding效果的方法詳解

來源:互聯網
上載者:User
給select元素增加:padding-left:20px;但是未生效,如所示:

在select上如何使設定padding生效?

方法一:

設定屬性appearance:

給select增加屬性: appearance: none; -webkit-appearance: none;

效果如下:

方法二:

給select設定樣式:text-indent: 20px;

效果如下:

以上這篇select元素中設定padding效果的方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支援topic.alibabacloud.com。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.