代码编辑器:
x
1
<script>
2
function displayResult(){
3
document.getElementById("p1").style.textShadow="5px 5px 1px #ff0000,10px 10px 1px #0000ff";
4
}
5
</script>
6
<p id="p1">这是一些文本</p>
7
<br>
8
<button type="button" onclick="displayResult()">添加文本的阴影</button>
9