用js实现左右阴影的切换

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
p{
text-align:center;
font:bold 60px Verdana, Geneva, sans-serif;
text-shadow:1em 1em 1em red;}
</style>
</head>

<body>
<p id="bt">HTML5+CSS3</p>
<input type="button" onClick="change('1em 1em 1em red')" value="右下角"/>
<input type="button" onClick="change('-1em 1em 1em yellow')" value="左下角"/>
<script type="text/javascript">
function change(bt){
document.getElementById("bt").style.textShadow=bt;}
</script>
</body>
</html>

原文地址:https://www.cnblogs.com/lylcn/p/6804500.html