SORU
19 Aralık 2011, PAZARTESİ


Bir şekilde, bir öğe üzerinde iki CSS3 kutu gölgeler var mı acaba?

İki gölgeler Photoshop mock-up düğme stilini çoğaltmak için çalışıyorum. İlk gölge çakmak kutusu, bir İç Gölge (2px) ve ikinci düğme dışında (5px) gölge kendisini bir damla.

http://i.stack.imgur.com/1i0Fe.png

Photoshop bu kadar kolay - İç Gölge ve Gölge. CSS görünüşe göre biri veya diğeri, ama ikisi de aynı anda yok edebilirim.

Eğer aşağıdaki kodu bir tarayıcıda denerseniz, kutu-gölge daraltması box-shadow geçersiz kılar göreceksiniz.

İşte İç metin kutusu gölge:

box-shadow: inset 0 2px 0px #dcffa6;

Ve bu düğme üzerindeki gölge: damla için istiyorum

box-shadow: 0 2px 5px #000;

Bağlam için, işte tam benim buton kodu (eğimler ve tüm ile):

button {
    outline: none;
    position: relative;
    width: 160px;
    height: 40px;
    font-family: 'Open Sans', sans-serif;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    text-shadow: 0px 1px 3px black; 
    border-radius: 3px;
    background-color: #669900;
    background: -webkit-gradient(linear, left top, left bottom, from(#97cb52), to(#669900));
    background: -moz-linear-gradient(top, #97cb52, #669900);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#97cb52', endColorstr='#669900');
    box-shadow: inset 0 2px 0px #dcffa6;
    box-shadow: 0 2px 5px #000;
    border: 1px solid #222;
    cursor: pointer;
}

CEVAP
19 Aralık 2011, PAZARTESİ


Virgül ile ayrı gölgeler

box-shadow: inset 0 2px 0px #dcffa6, 0 2px 5px #000;

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Kenneth Håkonsen

    Kenneth Håk

    13 Mart 2011
  • Peyton

    Peyton

    28 Aralık 2008
  • THELIFEOFPRICE

    THELIFEOFPRI

    16 Mart 2011