In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you the example analysis of linear gradient in Css technology, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Object selector {background:- browser prefix-linear-gradient (start direction, start color, end color);}
The syntax of radial gradient
Object selector {background:- browser prefix-radial-gradient (start direction, shape, size, start color, end color);}
A compatible method of gradual change
1. Linear gradient
Each browser prefix
(1) Firefox
(2) Safari, Chrome
(3) Opera 11.10 +
Compatible with IE
2. Radial gradient
The syntax of radial gradient is similar to that of linear gradient.
An example of gradient application
1. The radial gradient makes the background bigger.
Background-color:#4B770A;background-image:-webkit-gradient (radial,50%400,1,50%400,400,from (background-color:#4B770A;background-image:-webkit-gradient)), to (rgba); / / only achieved the effect under webkit
2. Mask effect
Position:fixed;width:100%;height:60px;bottom:0px;content:'';background:-moz-linear-gradient (top,rgba (255pyrone) 0) 0% recorder rgba (255pr. 255rgba 0.33) 33% pr. RGBA (255pr. 255rgba (255pr.) Background:-webkit-gradient (linear,lefttop,leftbottom,color-stop), color-stop (33% RGBA), color-stop (66% RGBA), color-stop (91% RGBA); background:-webkit-linear-gradient (top,rgba) 0% top,rgba (255pr) 255pr 0); 33% pr RGBA (255pr 255pr 0.33) 66% pr RGBA (255pr 255pr 1) 91% pr RGBA (255pr 255pr 1)) Background:-o-linear-gradient (top,rgba (255pr. 255pr. 0) 0% jrgba (255pr. 255e. 0.33) 33% maestro rgba (255pr. 255rgba.) 66% pr. Rgba (255pr. 255pr. 1) 91%); background:-ms-linear-gradient (top,rgba (255pr. 255m. 0) 0% pr. Rgba (255pr. 255e.) 0% pr.% rgba (255pr. 255pr. Filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#00ffffff',endColorstr='#ffffff',GradientType=0)
3. Gradient button
.myButton {- moz-box-shadow:inset0px1px0px0px#ffffff;-webkit-box-shadow:inset0px1px0px0px#ffffff;box-shadow:inset0px1px0px0px#ffffff;background:-webkit-gradient (linear,lefttop,leftbottom,color-stop (0.05 coded), color-stop (1mended dfdfdf)); background:-moz-linear-gradient (top,#ededed5%,#dfdfdf100%); background:-webkit-linear-gradient (top,#ededed5%,#dfdfdf100%); background:-o-linear-gradient (top,#ededed5%,#dfdfdf100%) Background:-ms-linear-gradient (top,#ededed5%,#dfdfdf100%); background:linear-gradient (tobottom,#ededed5%,#dfdfdf100%); filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#ededed',endColorstr='#dfdfdf',GradientType=0); background-color:#ededed;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1pxsolid#dcdcdc;display:inline-block;cursor:pointer;color:#777777;font-family:arial;font-size:15px;font-weight:bold Padding:6px24px;text-decoration:none;text-shadow:0px1px0px#ffffff;margin-top:100px;} .myButton: hover {background:-webkit-gradient (linear,lefttop,leftbottom,color-stop (0.05dfdfdf), color-stop (1authored)); background:-moz-linear-gradient (top,#dfdfdf5%,#ededed100%); background:-webkit-linear-gradient (top,#dfdfdf5%,#ededed100%); background:-o-linear-gradient (top,#dfdfdf5%,#ededed100%) Background:-ms-linear-gradient (top,#dfdfdf5%,#ededed100%); background:linear-gradient (tobottom,#dfdfdf5%,#ededed100%); filter:progid:DXImageTransform.Microsoft.gradient (startColorstr='#dfdfdf',endColorstr='#ededed',GradientType=0); background-color:#dfdfdf;} .myButton: active {position:relative;top:1px;}
These are all the contents of the article "sample Analysis of Linear gradients in Css Technology". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.