Skip to content

Commit 2a6c10a

Browse files
committed
修改login頁面
1 parent 2b2aa8b commit 2a6c10a

File tree

5 files changed

+118
-21
lines changed

5 files changed

+118
-21
lines changed

css/mohw.css

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7996,41 +7996,58 @@ div.tag ul li a:hover, div.tag ul li a:focus {
79967996
box-sizing: border-box;
79977997
}
79987998

7999-
.loginTab .tabSet .tabItem {
7999+
.loginTab .login_Tab .tabItem {
80008000
font-size: 1em;
8001-
margin: 0 6px;
8001+
margin: 0 4px;
80028002
}
8003-
.loginTab .tabSet .tabItem a {
8003+
.loginTab .login_Tab .tabItem a {
80048004
padding: 12px 30px;
80058005
background: #767676;
8006+
color: #fff;
8007+
border-radius: 4px 4px 0 0;
8008+
position: relative;
80068009
}
8007-
.loginTab .tabSet .tabItem.active a {
8008-
background: #984696;
8009-
}
8010-
.loginTab .tabSet .tabItem.active a:before {
8010+
.loginTab .login_Tab .tabItem a:before {
8011+
content: "";
8012+
position: absolute;
8013+
width: 0px;
8014+
height: 0px;
8015+
display: none;
8016+
border-style: solid;
80118017
border-width: 8px 10px 0 10px;
80128018
border-color: #984696 transparent transparent transparent;
80138019
bottom: -8px;
8020+
left: 50%;
80148021
margin-left: -10px;
8022+
z-index: 1;
8023+
}
8024+
.loginTab .login_Tab .tabItem.active a {
8025+
background: #984696;
8026+
}
8027+
.loginTab .login_Tab .tabItem.active a:before {
8028+
display: block;
8029+
}
8030+
.loginTab .login_Tab .tabContent {
8031+
background: #f2f2f2;
80158032
}
8016-
.loginTab .tabSet .tabContent .form_grid .form_grp p {
8033+
.loginTab .login_Tab .tabContent .form_grid .form_grp p {
80178034
margin: 0;
80188035
}
8019-
.loginTab .tabSet .tabContent .form_grid .form_grp p a {
8036+
.loginTab .login_Tab .tabContent .form_grid .form_grp p a {
80208037
text-decoration: underline;
80218038
margin: 0 2px;
80228039
}
8023-
.loginTab .tabSet .tabContent .form_grid .btn_grp {
8040+
.loginTab .login_Tab .tabContent .form_grid .btn_grp {
80248041
margin-bottom: 0;
80258042
padding-bottom: 0;
80268043
}
8027-
.loginTab .tabSet .tabContent .form_grid .btn_grp a {
8044+
.loginTab .login_Tab .tabContent .form_grid .btn_grp a {
80288045
text-decoration: underline;
80298046
}
8030-
.loginTab .tabSet ~ p {
8047+
.loginTab .login_Tab ~ p {
80318048
text-align: center;
80328049
}
8033-
.loginTab .tabSet ~ p a {
8050+
.loginTab .login_Tab ~ p a {
80348051
text-decoration: underline;
80358052
}
80368053

css/mohw.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/hyui.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,72 @@ $(function() {
625625
$('.related_tab .tabs>.tabItem:first-child>a').trigger('click');
626626
tabSetRelated();
627627

628+
629+
/*-----------------------------------*/
630+
////////////////多組Tab4////////////////
631+
/*-----------------------------------*/
632+
var resizeTimer3;
633+
_window.resize(function() {
634+
clearTimeout(resizeTimer3);
635+
resizeTimer3 = setTimeout(function() {
636+
ww = _window.outerWidth();
637+
tabSetLogin();
638+
}, 50);
639+
});
640+
641+
function tabSetLogin() {
642+
$('.login_Tab').each(function() {
643+
var _tab = $(this),
644+
_tabItem = _tab.find('.tabItem'),
645+
_tabItemA = _tabItem.children('a'),
646+
_tabContent = _tab.find('.tabContent'),
647+
tabwidth = _tab.width(),
648+
tabItemHeight = _tabItem.outerHeight(),
649+
tabContentHeight = _tab.find('.active').next().innerHeight(),
650+
tiGap = 0,
651+
tabItemLength = _tabItem.length,
652+
tabItemWidth;
653+
_tab.find('.active').next('.tabContent').show();
654+
if (ww >= wwSmall) {
655+
_tabContent.css('top', tabItemHeight);
656+
_tab.height(tabContentHeight + tabItemHeight);
657+
// tabItemWidth = (tabwidth - (tabItemLength - 1) * tiGap) / tabItemLength;
658+
tabItemWidth =_tabItem.width();
659+
// _tabItem.width(tabItemWidth).css('margin-left', tiGap);
660+
_tabItem.first().css('margin-left', 0);
661+
// _tabItem.last().css({ 'position': 'absolute', 'top': 0, 'right': 0 }).width(tabItemWidth);
662+
} else {
663+
_tab.css('height', 'auto');
664+
// _tabItem.width(tabwidth);
665+
_tabItem.css('margin-left', 0).last().css('position', 'relative');
666+
}
667+
_tabItemA.focus(tabs);
668+
_tabItemA.click(tabs);
669+
670+
function tabs(e) {
671+
var _tabItemNow = $(this).parent(),
672+
tvp = _tab.offset().top,
673+
tabIndex = _tabItemNow.index() / 2,
674+
scollDistance = tvp + tabItemHeight * tabIndex - hh;
675+
_tabItem.removeClass('active');
676+
_tabItemNow.addClass('active');
677+
if (ww <= wwSmall) {
678+
_tabItem.not('.active').next().slideUp();
679+
_tabItemNow.next().slideDown();
680+
$("html,body").stop(true, false).animate({ scrollTop: scollDistance });
681+
} else {
682+
_tabItem.not('.active').next().hide();
683+
_tabItemNow.next().show();
684+
tabContentHeight = _tabItemNow.next().innerHeight();
685+
_tab.height(tabContentHeight + tabItemHeight);
686+
}
687+
e.preventDefault();
688+
}
689+
});
690+
}
691+
$('.login_Tab .tabs>.tabItem:first-child>a').trigger('click');
692+
tabSetLogin();
693+
628694
/*-----------------------------------*/
629695
///////////////置頂go to top////////////
630696
/*-----------------------------------*/

login.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ <h2 class="title">
189189
<section class="fp">
190190
<!-- loginTab 新增區塊 -->
191191
<div class="loginTab">
192-
<div class="tabSet">
192+
<div class="tabSet login_Tab">
193193
<div class="tabs">
194194
<!-- tab1 -->
195195
<div class="tabItem active">

sass/page/_fp.scss

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,43 @@
44
}
55

66
.loginTab {
7-
.tabSet {
7+
.login_Tab {
88
.tabItem {
99
font-size: 1em;
10-
margin: 0 6px;
10+
margin: 0 4px;
1111
a {
1212
padding: 12px 30px;
1313
background: #767676;
14+
color: #fff;
15+
border-radius: 4px 4px 0 0;
16+
position: relative;
1417
&:before {
18+
content: "";
19+
position: absolute;
20+
width: 0px;
21+
height: 0px;
22+
display: none;
23+
border-style: solid;
24+
border-width: 8px 10px 0 10px;
25+
border-color: #984696 transparent transparent transparent;
26+
bottom: -8px;
27+
left: 50%;
28+
margin-left: -10px;
29+
z-index: 1;
1530
}
1631
}
1732
&.active {
1833
a {
1934
background: #984696;
35+
2036
&:before {
21-
border-width: 8px 10px 0 10px;
22-
border-color: #984696 transparent transparent transparent;
23-
bottom: -8px;
24-
margin-left: -10px;
37+
display: block;
2538
}
2639
}
2740
}
2841
}
2942
.tabContent {
43+
background: #f2f2f2;
3044
.form_grid {
3145
.form_grp {
3246
p {

0 commit comments

Comments
 (0)