2017-01-28 15 views
0

私は現在のコード(グラデーションスタイル)を変更したくありません。 センターでは1つの円しか必要ありません


 
#bar { 
 
    position: relative; 
 
    height: 200px; 
 
    width: 600px; 
 
    background: linear-gradient(to left, yellow 99.9%, blue 99.9%), radial-gradient(circle at 50% 50%, yellow 50%, transparent 10%); 
 
    background-position: 50% 100px, 50% 50%; 
 
    background-size:100% 15px, 100px 100px; 
 
    background-repeat: no-repeat, repeat-x; 
 
}
<div id="bar"></div>

答えて

2

を削除する必要がありますrepeat-x

#bar { 
 
    position: relative; 
 
    height: 200px; 
 
    width: 600px; 
 
    background: linear-gradient(to left, yellow 99.9%, blue 99.9%), radial-gradient(circle at 50% 50%, yellow 50%, transparent 10%); 
 
    background-position: 50% 100px, 50% 50%; 
 
    background-size:100% 15px, 100px 100px; 
 
    background-repeat: no-repeat; 
 
}
<div id="bar"></div>

+0

おかげで多くを削除する:) –

1

あなたはrepeat-x

#bar { 
    position: relative; 
    height: 200px; 
    width: 600px; 
    background: #fff; //type in your color between # and ; 
    background-position: 50% 100px, 50% 50%; 
    background-size:0 15px, 100px 100px; 
    background-repeat: no-repeat; 
}