1 Star 0 Fork 0

hll/露露

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
js.css 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
h1537 提交于 2023-12-19 16:02 . 添加了消息通知和学院新闻两块
.slide {
width: inherit;
height: inherit;
overflow: hidden;
position: relative;
}
/* 鼠标放上去显示按钮 */
.slide:hover .labels {
display: flex;
}
.slide:hover .list {
animation: none;
}
.slide input {
display: none;
}
/* 按钮位置 */
.labels {
position: absolute;
bottom: 0.5em;
z-index: 1;
width: inherit;
justify-content: center;
display: none;
/* 鼠标移开隐藏按钮 */
}
/* 按钮样式 */
.labels label {
width: 1rem;
height: 1rem;
border-radius: 50%;
margin: 0 0.3rem;
border: 0.1rem solid #fff;
background-color: black;
box-sizing: border-box;
cursor: pointer;
}
/* 选择哪个按钮就有被点击的效果 */
input[id=pic1]:checked~.labels label[for=pic1],
input[id=pic2]:checked~.labels label[for=pic2],
input[id=pic3]:checked~.labels label[for=pic3],
input[id=pic4]:checked~.labels label[for=pic4],
input[id=pic5]:checked~.labels label[for=pic5] {
background-color: #fff;
border: 0.1rem solid #fff;
}
/* 按钮控件选择图片 */
input[id=pic1]:checked~.list {
transform: translate(calc(0 * 600px));
}
input[id=pic2]:checked~.list {
transform: translate(calc(-1 * 600px));
}
input[id=pic3]:checked~.list {
transform: translate(calc(-2 * 610px));
}
input[id=pic4]:checked~.list {
transform: translate(calc(-3 * 607px));
}
input[id=pic5]:checked~.list {
transform: translate(calc(-4 * 608px));
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hlland/lulu.git
git@gitee.com:hlland/lulu.git
hlland
lulu
露露
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385