1 Star 1 Fork 0

未莫/JS_JQuery特效

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
JS_DOM练习.html 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
未莫 提交于 2023-09-07 16:12 . 第五次提交
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>js_DOM练习</title>
</head>
<style>
.left {
width: 100px;
height: 100px;
border: 1px solid black;
display: flex;
justify-content: center;
align-items: center;
align-content: center;
position: relative;
margin: 10px;
}
span {
width: 50px;
height: 5px;
border-radius: 2px;
background-color: black;
display: block;
position: absolute;
}
.left span:nth-child(1) {
transform: rotate(45deg);
}
.left span:nth-child(2) {
transform: rotate(-45deg);
}
</style>
<body>
<div class="bigbox">
<div class="left" onclick="closePhoto()">
<span></span>
<span></span>
</div>
<div id="photo">
<img src="./images/work-img.png" alt="">
</div>
</div>
</body>
<script type="text/javascript">
function closePhoto() {
var photoShow = document.getElementById("photo");
photoShow.style["display"] = 'none';
}
</script>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weimomolin/js--jquery-special-effects.git
git@gitee.com:weimomolin/js--jquery-special-effects.git
weimomolin
js--jquery-special-effects
JS_JQuery特效
master

搜索帮助