This commit is contained in:
BoHung Chiu 2021-06-16 16:45:07 +08:00
parent c172fb59d6
commit 63c3f4733a
3 changed files with 15 additions and 16 deletions

View File

@ -395,14 +395,14 @@
$(document).ready(function(){
if(window.location.search.indexOf('editmode=on') == -1){
$(".nav-tabs").each(function(i,v){
$(v).siblings("*").not("script").addClass("tab-pane fade");
$(v).siblings("*").not("script").eq(0).addClass("active in");
$(v).nextAll("*").not("script").addClass("tab-pane fade");
$(v).nextAll("*").not("script").eq(0).addClass("active in");
var tab_content = $("<div class=\"tab-content\"></div>")
$(v).siblings("*").not("script").appendTo(tab_content);
$(v).nextAll("*").not("script").appendTo(tab_content);
$(v).after(tab_content);
$(v).find("li").click(function(){
$(this).parent().siblings(".tab-content").find(".tab-pane").removeClass("active in");
$(this).parent().siblings(".tab-content").find(".tab-pane").eq($(this).index()).addClass("active in");
$(v).find("li").off('click').click(function(){
$(this).parent().nextAll(".tab-content").eq(0).find(".tab-pane").removeClass("active in");
$(this).parent().nextAll(".tab-content").eq(0).find(".tab-pane").eq($(this).index()).addClass("active in");
$(this).addClass('active');
$(this).siblings('li').removeClass('active');
})

View File

@ -41,9 +41,6 @@
margin-top: 20px;
margin-bottom:20px;
}
@media(max-width: 690px)and(min-width: 480px){
width:30%;
}
@media(max-width: 480px){
margin:5px 0 7px 0;
height:auto;

View File

@ -42,7 +42,7 @@ h3{
opacity: 0;
top: -20000px;
background: rgba(0,0,0,.7);
z-index: 1000;
z-index: 1100;
left: 0;
transition:opacity .3s ,top 0s .3s;
&.active{
@ -72,20 +72,22 @@ h3{
font-weight: bold;
transition:opacity .5s ,top .5s, left 0s .5s;
padding: 2px;
@media (min-width: 768px){
width: 40%;
padding: 30px;
}
@media (min-width: 768px){
width: 40%;
padding: 30px;
}
@media (max-width: 767px){
padding: 30px 10px;
}
.close-btn{
position: absolute;
right: 0;
top:-40px;
top:0;
padding: 5px 10px;
background: $theme-color-main;
color:#fff;
font-size: 18px;
transition:.3s;
&:hover{
background: $theme-color-second;
}