Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outline gradient - css [duplicate]

Tags:

html

css

I need help with adding gradient to outline. I can't larger height because positioning wouldn't work right. Is there any way? I tried to merge this code with gradient class but gradient worked only for that 1px height. Any suggestions?

    height: 1px !important;
    background: #D3D3D3;    
    position: absolute;
    right: 0px;
    width: 50%;
    top: 50%;
    outline: 3px solid #D3D3D3;  

Thanks, Jan

http://jsfiddle.net/he703uzv/

like image 356
spaceholder Avatar asked Aug 16 '26 22:08

spaceholder


1 Answers

.outline-border { 
    width: 400px;
    padding: 20px;
    border-top: 10px solid #47c465;
    border-bottom:10px solid #00deff;
    background-image: 
        linear-gradient(#47c465, #00deff),
        linear-gradient(#47c465, #00deff)
    ;
    background-size:10px 100%;
    background-position:0 0, 100% 0;
    background-repeat:no-repeat;
}
<div class="outline-border">Hello World!</div>

See Outline Gradient.

like image 177
UI-UX Avatar answered Aug 18 '26 13:08

UI-UX



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!