new file: jpg/11.jpg
new file: jpg/12.jpg new file: jpg/13.jpg new file: jpg/14.jpg new file: jpg/15.jpg modified: script.js modified: styles.css
This commit is contained in:
parent
e98c6b6726
commit
19ad050266
BIN
jpg/11.jpg
Normal file
BIN
jpg/11.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 148 KiB |
BIN
jpg/12.jpg
Normal file
BIN
jpg/12.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 382 KiB |
BIN
jpg/13.jpg
Normal file
BIN
jpg/13.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 239 KiB |
BIN
jpg/14.jpg
Normal file
BIN
jpg/14.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
BIN
jpg/15.jpg
Normal file
BIN
jpg/15.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 151 KiB |
15
script.js
15
script.js
@ -35,9 +35,9 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$(".tab").find(".addTab").before(newTabButton);
|
$(".tab").find(".addTab").before(newTabButton);
|
||||||
$("body").append(newTabContent);
|
$("body").append(newTabContent);
|
||||||
|
|
||||||
// 绑定新添加的选项卡按钮和删除按钮的事件
|
// 绑定新添加的选项卡按钮和删除按钮的事件
|
||||||
bindTabEvents();
|
bindTabEvents();
|
||||||
|
updateContentOpacity(slider.val());
|
||||||
});
|
});
|
||||||
|
|
||||||
// 删除选项卡
|
// 删除选项卡
|
||||||
@ -51,7 +51,6 @@ $(document).ready(function() {
|
|||||||
// 删除当前标签页
|
// 删除当前标签页
|
||||||
$("#" + tabName).remove();
|
$("#" + tabName).remove();
|
||||||
$("button[data-tab='" + tabName + "']").remove();
|
$("button[data-tab='" + tabName + "']").remove();
|
||||||
|
|
||||||
// 如果删除的是当前活动的标签页
|
// 如果删除的是当前活动的标签页
|
||||||
if (tabName === activeTab) {
|
if (tabName === activeTab) {
|
||||||
// 显示上一个标签页
|
// 显示上一个标签页
|
||||||
@ -277,15 +276,19 @@ $(document).ready(function() {
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
const slider = $('#mySlider');
|
const slider = $('#mySlider');
|
||||||
const sliderValue = $('#sliderValue');
|
const sliderValue = $('#sliderValue');
|
||||||
|
//const content = $('.tabcontent');
|
||||||
// 初始化显示滑块的值
|
// 初始化显示滑块的值
|
||||||
sliderValue.text(slider.val());
|
sliderValue.text(slider.val());
|
||||||
|
updateContentOpacity(slider.val());
|
||||||
// 监听滑块值的变化
|
// 监听滑块值的变化
|
||||||
slider.on('input', function() {
|
slider.on('input', function() {
|
||||||
sliderValue.text(slider.val());
|
const value = slider.val();
|
||||||
});
|
sliderValue.text(value);
|
||||||
|
updateContentOpacity(value);});
|
||||||
});
|
});
|
||||||
|
function updateContentOpacity(value) {
|
||||||
|
$('.tabcontent').css('--content-opacity', value / 100);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#closeButton').click(function() {
|
$('#closeButton').click(function() {
|
||||||
|
15
styles.css
15
styles.css
@ -1,7 +1,8 @@
|
|||||||
/* 选项卡按钮样式 */
|
:root {
|
||||||
.tabcontent {
|
--content-opacity: 0.5; /* 定义透明度变量 */
|
||||||
text-align: center; /* 使“日期”居中显示 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 选项卡按钮样式 */
|
||||||
.tab {
|
.tab {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid #ff69b4; /* 粉色边框 */
|
border: 1px solid #ff69b4; /* 粉色边框 */
|
||||||
@ -45,11 +46,12 @@
|
|||||||
|
|
||||||
/* 选项卡内容样式 */
|
/* 选项卡内容样式 */
|
||||||
.tabcontent {
|
.tabcontent {
|
||||||
|
text-align: center; /* 使“日期”居中显示 */
|
||||||
display: none;
|
display: none;
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
border: 1px solid #ff69b4; /* 粉色边框 */
|
border: 1px solid #ff69b4; /* 粉色边框 */
|
||||||
border-top: none;
|
border-top: none;
|
||||||
background-color: #fff; /* 白色背景 */
|
background-color: rgba(255, 255, 255, var(--content-opacity)); /* 白色背景 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 删除按钮样式 */
|
/* 删除按钮样式 */
|
||||||
@ -71,7 +73,7 @@
|
|||||||
img{height: auto; width: auto\9; width:28%;}
|
img{height: auto; width: auto\9; width:28%;}
|
||||||
|
|
||||||
.cldBody {
|
.cldBody {
|
||||||
background: #f7f7f7;
|
background-color: rgba(255, 255, 255, var(--content-opacity));
|
||||||
width: 420px;
|
width: 420px;
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
}
|
}
|
||||||
@ -93,9 +95,10 @@ td {
|
|||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
background-color: rgba(255, 255, 255, var(--content-opacity));
|
||||||
}
|
}
|
||||||
#tbody td:hover {
|
#tbody td:hover {
|
||||||
background: #ededed;
|
background: rgba(30, 30, 30, 0.2);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.curDate {
|
.curDate {
|
||||||
|
Loading…
Reference in New Issue
Block a user