svg+css实现黑夜中眼睛跟随鼠标移动效果代码

代码语言:html

所属分类:其他

代码描述:svg+css实现黑夜中眼睛跟随鼠标移动效果代码

代码标签: svg css 黑夜 眼睛 跟随 鼠标 移动

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
body {
	background: #000;
}
#eye {
	position:absolute;
	top:50%;
	left:50%;
	transform:translate(-50%,-50%);
	height:50px;
	width:50px;
}
</style>

  
  
  
</head>

<body translate="no">
  <svg id="eye" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
	<filter id="lightMeee">
    <feDiffuseLighting in="SourceGraphic" result="light" lighting-color="white">
      <feSpotLight id="light" x="50" y="50" z="40" limitingConeAngle="10" pointsAtX="56" pointsAtY="48" pointsAtZ="0"></feSpotLight>
    </feDiffuseLighting>

    <feComposite in="SourceGraphic" in2="light" operator="arithmetic" k1="1" k2="0.37" k3="0" k4="-0.24"></feComposite>
  </filter>
	<filter id="lightMeee2">
    <feDiffuseLighting in="SourceGraphic" result="light" lighting-color="white">
      <feSpotLight id="light2" x="50" y="50" z="40" limitingConeAngle="10" pointsAtX="56" pointsAtY="48" pointsAtZ="0"></feSpotLight>.........完整代码请登录后点击上方下载按钮下载查看

网友评论0