Tagged: gradient background
-
AuthorPosts
-
August 3, 2018 at 2:15 am #993070
Hi,
i want to use this gradient code: linear-gradient(171.34deg, #8E9EAB 13.77%, #FFFFFF 53.82%, #C9D1D7 84.83%);
in inspect element this codes works fine, but when i use it on quick css like this:.firstcolorblock {
background-color: #8E9EAB;
background-image: linear-gradient(171.34deg, #8E9EAB 13.77%, #FFFFFF 53.82%, #C9D1D7 84.83%);
}But unfortunately no effect, even i tried this code from your previous topic related to gradient color:
.firstcolorblock {
background: -webkit-linear-gradient(grey, white);
background: -o-linear-gradient(grey, white);
background: -moz-linear-gradient(grey, white);
background: linear-gradient(grey, white);
}i tried both with custom id and class but no success and i want to use the same gradient for my buttons as well. like previously explained in inspect element button gradient take effect but when i paste it in quick css it not taking effect.
Waiting for your solution.
Thank you
HarisAugust 3, 2018 at 9:29 am #993120there are a lot of good grandient online creators:
http://angrytools.com/gradient/
realy madness:
http://elrumordelaluz.github.io/draGGradients/i generated the code from above ( don’t know if you would recognize the .14% etc ):
see here your test-page: https://webers-testseite.de/crunchybuzz/
i give to the color-section the class: gradient-section
and to the button: gradient-buttonhere is my quick css code:
.gradient-section, .gradient-button a { background-color: #8E9EAB !important; background: -moz-linear-gradient(279deg, #8E9EAB 0%, #8E9EAB 14%, #ffffff 54%, #C9D1D7 85%, #C9D1D7 100%); /* ff3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #8E9EAB), color-stop(14%, #8E9EAB), color-stop(54%, #ffffff), color-stop(85%, #C9D1D7), color-stop(100%, #C9D1D7)); /* safari4+,chrome */ background: -webkit-linear-gradient(279deg, #8E9EAB 0%, #8E9EAB 14%, #ffffff 54%, #C9D1D7 85%, #C9D1D7 100%); /* safari5.1+,chrome10+ */ background: -o-linear-gradient(279deg, #8E9EAB 0%, #8E9EAB 14%, #ffffff 54%, #C9D1D7 85%, #C9D1D7 100%); /* opera 11.10+ */ background: -ms-linear-gradient(279deg, #8E9EAB 0%, #8E9EAB 14%, #ffffff 54%, #C9D1D7 85%, #C9D1D7 100%); /* ie10+ */ background: linear-gradient(171deg, #8E9EAB 0%, #8E9EAB 14%, #ffffff 54%, #C9D1D7 85%, #C9D1D7 100%); /* w3c */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8E9EAB', endColorstr='#C9D1D7',GradientType=0 ); /* ie6-9 */ } .gradient-button a { color: #333 !important; box-shadow: 4px 4px 8px #333; border: none !important; }
last rule is just to see the button on same gradient clearly. – border: none seems to be important when overlaying with a gradient –
or take the same color: #8e9eabsomething new to me too:
the angle is different to the -webkit, moz-, o- etc ? Strange thingNote: Multiple browsers implement (with prefix) an older draft of the specification where 0deg points right instead of up. Therefore, the value of the angle should be taken into account when using the standardized linear gradient and the mixed one with prefix.
most of those entries aren’t needed if you can ignore old ie6-9 ; opera and moz will not be necessary on the new versions
PPS: a lot of beginners put in that custom-class field the phrase with the dot ( .firstcolorblock) but this is wrong.
in that field only the class name was inserted. I’m not saying it happened to you, but it’s been here before.August 3, 2018 at 10:44 am #993157Hi crunchybuzz,
The section reading MOST INDIVIDUALS AND COMPANIES FAIL TO PROTECT THEMSELVES AGAINST THE RISKS OF REPORTING ERRORS. seems to have a gradient background. Did you manage to get it working?
Thanks @guenni007 for helping out :-)
Best regards,
RikardAugust 3, 2018 at 1:44 pm #993263Thank you @guenni007 for the help it works fine. i got the desired gradient color.
There is one more problem @guenni007 & @rikard , since new version of enfold or may be policies changes worldwide, background video is not playing auto on mobile devices and even in some elements like full width slider video is not showing up on mobile devices and i am fall back image for that. i tried it on color section background but it’s playing auto which is the basic requirement.
Please help i need to place a video in background and it should auto play on mobile devices. it’s fine on desktop version.
Thank you
HarisAugust 6, 2018 at 8:51 pm #994084Hi Haris,
Your guess is correct. Autoplay feature is disabled by browser by default and visitors need to enable them – https://www.howtogeek.com/326532/safari-now-disables-auto-playing-videos.-heres-how-to-allow-them-for-certain-sites/
Best regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.