• 为什么不用css3的 线性和放射性 因为没有svg的简介以及浏览器支持的多


    <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="600px" version="1.1">
    <defs>
    <radialGradient id="radialGradient_r1" cx="50%" cy="50%" r="0%" fx="50%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="radialGradient_r2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="radialGradient_r3" cx="50%" cy="50%" r="100%" fx="50%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="radialGradient_c1" cx="0%" cy="50%" r="50%" fx="50%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="radialGradient_c2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="radialGradient_c3" cx="100%" cy="50%" r="50%" fx="50%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="radialGradient_f1" cx="50%" cy="50%" r="50%" fx="0%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="radialGradient_f2" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="radialGradient_f3" cx="50%" cy="50%" r="50%" fx="100%" fy="50%">
    <stop offset="0%" style="stop-color:red;stop-opacity:1"/>
    <stop offset="50%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>
    <defs>
    <radialGradient id="grey_black" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
    <stop offset="0%" style="stop-color:white;stop-opacity:1"/>
    <stop offset="100%" style="stop-color:black;stop-opacity:1"/>
    </radialGradient>
    </defs>


    <ellipse cx="120" cy="120" rx="110" ry="100" style="fill:url(#grey_black)"/>
    <ellipse cx="120" cy="300" rx="100" ry="50" style="fill:url(#radialGradient_r1)"/>
    <ellipse cx="350" cy="300" rx="100" ry="50" style="fill:url(#radialGradient_r2)"/>
    <ellipse cx="580" cy="300" rx="100" ry="50" style="fill:url(#radialGradient_r3)"/>
    <ellipse cx="120" cy="420" rx="100" ry="50" style="fill:url(#radialGradient_c1)"/>
    <ellipse cx="350" cy="420" rx="100" ry="50" style="fill:url(#radialGradient_c2)"/>
    <ellipse cx="580" cy="420" rx="100" ry="50" style="fill:url(#radialGradient_c3)"/>
    <ellipse cx="120" cy="540" rx="100" ry="50" style="fill:url(#radialGradient_f1)"/>
    <ellipse cx="350" cy="540" rx="100" ry="50" style="fill:url(#radialGradient_f2)"/>
    <ellipse cx="580" cy="540" rx="100" ry="50" style="fill:url(#radialGradient_f3)"/>
    </svg>

  • 相关阅读:
    杭电1005
    幂运算
    oj题目分类
    js判断手机或Pc端登陆.并跳转到相应的页面
    sessionStorage或localStorage实现注册登录demo
    html5手机端定位
    微信小程序开发基础知识总结
    eCharts.js使用心得
    前端性能优化--图片懒加载(lazyload image)
    19 款仿 Bootstrap 后台管理主题下载,finrUI控件,好用的ui框架
  • 原文地址:https://www.cnblogs.com/luziluck/p/10256356.html
Copyright © 2020-2023  润新知