HTML CSS examples for CSS Widget:Color
Use Gradient color blending/interpolation
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .c {<!-- w w w .ja va 2 s . c om--> width: 200px; height: 200px; position: relative; margin-bottom: 20px; } body { background-color: black; } .white { background-color: white; height: 100%; } .grad-bg { background-image: -webkit-linear-gradient(top, #ff0000, #fff); height: 100%; } .masked { -webkit-mask-image:-webkit-linear-gradient(top, white, transparent, white); } .testCover { width: 100px; position:absolute; top: 0; left: 150px; } .brdr { border-left: 1px solid white; } </style> </head> <body> <div class="c"> <div class="white"></div> <div class="testCover grad-bg masked"></div> </div> <div class="c"> <div class="grad-bg"></div> <div class="testCover grad-bg masked"></div> </div> </body> </html>