box-shadow中的理解(bootstrap)

來源:互聯網
上載者:User

標籤:

剛研究了bootstrap中css裡面的源碼,找到了表單(form)中關於輸入框的一些設定,根據要求,label標籤和input標籤需要一起使用,(螢幕助讀程式中不能單獨辨認input),如需隱藏label標籤,在label中設定.sr-only這個class即可.看了下.form-control這個屬性(應用在input標籤上),下面是這個css樣式.

 1 .form-control { 2   display: block; 3   width: 100%; 4   height: 34px; 5   padding: 6px 12px; 6   font-size: 14px; 7   line-height: 1.42857143; 8   color: #555; 9   background-color: #fff;10   background-image: none;11   border: 1px solid #ccc;12   border-radius: 4px;13   -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);14           box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);15   -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;16        -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;17           transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;18 }

我們發現它做了transition的效果,box-shadow的ease-in-out .15s的過渡時間,inset表示內陰影,類似ps中blur shadow的效果.改變這個時間可以產生點擊input框,那種淺藍色的效果出現的時間就會相應改變.不過bootstrap這些事件設定的很好,不需要做什麼修改,只是給以後做這種類似的效果一個思路罷了.

http://blog.csdn.net/freshlover/article/details/7610269這裡有詳細的介紹各個參數的.就不多說了.

主要是從中要思考到,動畫效果的加入,不單單是一個陰影的使用.

 

box-shadow中的理解(bootstrap)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.