html - CSS Button with Gradient Border -
i want make button seen in picture silver-ish border gradient. have done except border stuck it. below current css button.
.button_submit { background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #0cbbc8), color-stop(1, #008995)); background:-moz-linear-gradient(top, #0cbbc8 5%, #008995 100%); background:-webkit-linear-gradient(top, #0cbbc8 5%, #008995 100%); background:-o-linear-gradient(top, #0cbbc8 5%, #008995 100%); background:-ms-linear-gradient(top, #0cbbc8 5%, #008995 100%); background:linear-gradient(to bottom, #0cbbc8 5%, #008995 100%); filter:progid:dximagetransform.microsoft.gradient(startcolorstr='#0cbbc8', endcolorstr='#008995',gradienttype=0); background-color:#0cbbc8; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; border:1px solid #ffffff; display:inline-block; cursor:pointer; color:#ffffff; font-family:arial; font-size:15px; font-weight:bold; padding:6px 24px; text-decoration:none; } .button_submit:hover { background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #008995), color-stop(1, #0cbbc8)); background:-moz-linear-gradient(top, #008995 5%, #0cbbc8 100%); background:-webkit-linear-gradient(top, #008995 5%, #0cbbc8 100%); background:-o-linear-gradient(top, #008995 5%, #0cbbc8 100%); background:-ms-linear-gradient(top, #008995 5%, #0cbbc8 100%); background:linear-gradient(to bottom, #008995 5%, #0cbbc8 100%); filter:progid:dximagetransform.microsoft.gradient(startcolorstr='#008995', endcolorstr='#0cbbc8',gradienttype=0); background-color:#008995; } .button_submit:active { position:relative; top:1px; }
adding box-shadow
gets pretty close. play :before
psuedo-element white background.
the key part added is:
box-shadow: 0px 2px 5px -1px #333;
you'll have play around start.
.button_submit { position: relative; box-shadow: 0px 2px 5px -1px #333; background:linear-gradient(to bottom, #0cbbc8 5%, #008995 100%); background-color:#0cbbc8; border-radius:6px; border:1px solid #ffffff; display:inline-block; cursor:pointer; color:#ffffff; font-family:arial; font-size:15px; font-weight:bold; padding:6px 24px; text-decoration:none; } .button_submit:hover { background:linear-gradient(to bottom, #008995 5%, #0cbbc8 100%); background-color:#008995; } .button_submit:active { position:relative; top:1px; }
<button class="button_submit"> submit </button>
Comments
Post a Comment