0

複数の背景(1. #fff、2)img 3)グラデーションの背景を作成しようとしています。しかし、それは機能していないようです

これが私の出力がどのようになるかです

コードサンプル

<div id="send-date" class="transaction-details">
        <label for="date">Send on</label>
        <input type="date" name="date" id="date"/>
</div><!-- /send-date -->

#send-date input {
    background: #fff,
                url(../img/icon_calendar_36x36.png), 
                linear-gradient(btop, #FFFFFF 30%, #BFCBFB 65%, #869CFF 100%);
    background-repeat: no-repeat;
    background-position: 0% 0%, 96% 50%, 0% 0%;
    background-size: cover, 24px, cover;
    border: 1px solid #d9d9d9;
    text-shadow: none;
}

#send-date input.ui-focus{
    background-image: url(../img/icon_calendar_36x36.png);
    background-repeat: no-repeat;
    background-position: 96% 50%;
    background-size: 24px;
    border: 1px solid #a18492;
    background-color: #d9d9d9;
    -moz-box-shadow: inset 2px 2px 8px #AAAAAA;
    -webkit-box-shadow: inset 2px 2px 8px #AAAAAA;
    box-shadow: inset 2px 2px 8px #AAAAAA;
}

デモ

4

1 に答える 1

1

この記事から、css3のグラデーションは画像として生成され、url(foobar)の代わりに使用できるようです。

したがって、同じ要素内の画像ではうまく機能しない可能性があると思います。

画像の背景グラデーションに透明なオーバーレイを試してください。またはその逆。

于 2012-12-11T02:43:42.937 に答える