SVG——小事例

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
     body{
	background-image:url('0.jpg');
	background-repeat: no-repeat; /**背景图填充位置:不填充**/
	background-attachment: fixed; /**这个属性必须与 background-image 一起使用**/
    }
  </style>
 </head>
 <body>
    <p>弹幕效果</p>
    <svg width="100%" height="25" >
        <g>
            <text font-family="微软雅黑" font-size="20" y="20" x="100%">
                前方高能٩(。•́‿•̀。)۶
                <animate attributename="x" from="100%" to="-200" begin="0s" dur="3s" repeatcount="indefinite"></animate>
            </text>
        </g>
    </svg>
    <p>旋转效果</p>
    <svg width="400" height="400" style="box-sizing:border-box">
        <g transform="rotate(262.54 180 180)" style="box-sizing:border-box">
            <text font-family="微软雅黑" font-size="30" y="160" x="160" style="box-sizeing:border-box">
                旋转木马
                <animate attributename="transform" begin="0s" dur="10s" type="rotate" from=" 0 180 180" to="360 180 180" repeatcount="indefinite" style="box-sizing:border-box"></animate>
            </text>	
        </g>
    </svg>
    <p>改变透明度效果</p>
    <center>
        <svg  xmlns="http://www.w3.org/2000/svg" version="1.1">
            <text x="35%" y="20" fill="#898989" font-family="微软雅黑" font-weight="bold" font-size="14">
            
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值