Team:SJTU-BioX-Shanghai/component.css

From 2014.igem.org

(Difference between revisions)
 
(15 intermediate revisions not shown)
Line 1: Line 1:
/* reset  list style */
/* reset  list style */
-
  .cbp-tm-menu,
+
.cbp-tm-menu,
-
  .cbp-tm-menu ul {
+
.cbp-tm-menu ul {
list-style: none;
list-style: none;
 +
        font-size:1.1em;
}
}
/* set menu position; change here to set to relative or float, etc. */
/* set menu position; change here to set to relative or float, etc. */
-
  .cbp-tm-menu {
+
.cbp-tm-menu {
display: block;
display: block;
z-index: 1000;
z-index: 1000;
/*position: absolute;
/*position: absolute;
bottom: 0;
bottom: 0;
-
background: #47a3da;
+
width: 100%;
 +
background: #68afbc;
text-align: right;
text-align: right;
padding: 0 2em;
padding: 0 2em;
Line 19: Line 21:
/* first level menu items */
/* first level menu items */
-
  .cbp-tm-menu > li {
+
.cbp-tm-menu > li {
display: inline-block;
display: inline-block;
-
margin: 0 2em;
+
margin: 0 2.6em;
position: relative;
position: relative;
}
}
-
  .cbp-tm-menu > li > a {
+
.cbp-tm-menu > li > a {
-
        line-height: 1em;
+
line-height: 4em;
-
padding: 0 0.2em;
+
padding: 0 0.3em;
-
font-size: 2em;
+
font-size: 1.2em;
display: block;
display: block;
-
color: #fcf7e0;
+
color: #fbf4de;
}
}
-
  .no-touch .cbp-tm-menu > li > a:hover,
+
.no-touch .cbp-tm-menu > li > a:hover,
-
  .no-touch .cbp-tm-menu > li > a:active {
+
.no-touch .cbp-tm-menu > li > a:active {
-
color: #17c4bb;
+
color: #fbf4de;
}
}
/* sumbenu with transitions */
/* sumbenu with transitions */
-
  .cbp-tm-submenu {
+
.cbp-tm-submenu {
position: absolute;
position: absolute;
display: block;
display: block;
Line 52: Line 54:
}
}
-
  .cbp-tm-show .cbp-tm-submenu {
+
.cbp-tm-show .cbp-tm-submenu {
width: 16em;
width: 16em;
left: 50%;
left: 50%;
Line 64: Line 66:
}
}
-
  .cbp-tm-show-above .cbp-tm-submenu {
+
.cbp-tm-show-above .cbp-tm-submenu {
bottom: 100%;
bottom: 100%;
padding-bottom: 10px;
padding-bottom: 10px;
}
}
-
  .cbp-tm-show-below .cbp-tm-submenu {
+
.cbp-tm-show-below .cbp-tm-submenu {
top: 100%;
top: 100%;
padding-top: 10px;
padding-top: 10px;
Line 75: Line 77:
/* extreme cases: not enough space on the sides */
/* extreme cases: not enough space on the sides */
-
  .cbp-tm-nospace-right .cbp-tm-submenu {
+
.cbp-tm-nospace-right .cbp-tm-submenu {
right: 0;
right: 0;
left: auto;
left: auto;
}
}
-
  .cbp-tm-nospace-left .cbp-tm-submenu {
+
.cbp-tm-nospace-left .cbp-tm-submenu {
left: 0;
left: 0;
}
}
/* last menu item has to fit on the screen */
/* last menu item has to fit on the screen */
-
  .cbp-tm-menu > li:last-child .cbp-tm-submenu {
+
.cbp-tm-menu > li:last-child .cbp-tm-submenu {
right: 0;
right: 0;
}
}
Line 94: Line 96:
*/
*/
-
  .cbp-tm-submenu:after {
+
.cbp-tm-submenu:after {
border: solid transparent;
border: solid transparent;
content: " ";
content: " ";
Line 104: Line 106:
}
}
-
  .cbp-tm-show-above .cbp-tm-submenu:after {
+
.cbp-tm-show-above .cbp-tm-submenu:after {
top: 100%;
top: 100%;
margin-top: -10px;
margin-top: -10px;
}
}
-
  .cbp-tm-show-below .cbp-tm-submenu:after {
+
.cbp-tm-show-below .cbp-tm-submenu:after {
bottom: 100%;
bottom: 100%;
margin-bottom: -10px;
margin-bottom: -10px;
}
}
-
  .cbp-tm-submenu:after {
+
.cbp-tm-submenu:after {
border-color: transparent;
border-color: transparent;
border-width: 16px;
border-width: 16px;
Line 121: Line 123:
}
}
-
  .cbp-tm-show-above .cbp-tm-submenu:after {
+
.cbp-tm-show-above .cbp-tm-submenu:after {
-
border-top-color: #F0E1A5;
+
border-top-color: #fbf4de;
}
}
-
  .cbp-tm-show-below .cbp-tm-submenu:after {
+
.cbp-tm-show-below .cbp-tm-submenu:after {
-
border-bottom-color: #fcf7e0;
+
border-bottom-color: #fbf4de;
}
}
-
  [role="navigation"] ul.cbp-tm-submenu > li {
+
[role="navigation"] ul.cbp-tm-submenu > li {
width: 100%;
width: 100%;
display: block;
display: block;
-
background: #fcf7e0;
+
background: #fbf4de;
}
}
-
  [role="banner"].sticky ul.cbp-tm-submenu > li {
+
[role="banner"].sticky ul.cbp-tm-submenu > li {
width: 100%;
width: 100%;
display: block;
display: block;
-
background: #fcf7e0;
+
background: #fbf4de;
padding: 0 !important;
padding: 0 !important;
Line 144: Line 146:
-
  [role="banner"].sticky ul.cbp-tm-menu li:nth-of-type(2) .cbp-tm-submenu {
+
[role="banner"].sticky ul.cbp-tm-menu li:nth-of-type(2) .cbp-tm-submenu {
left: 35%;
left: 35%;
}
}
-
  [role="banner"].sticky ul.cbp-tm-menu li:nth-of-type(3) .cbp-tm-submenu {
+
[role="banner"].sticky ul.cbp-tm-menu li:nth-of-type(3) .cbp-tm-submenu {
left: 65%;
left: 65%;
}
}
-
  [role="navigation"] ul.cbp-tm-submenu > li > a {
+
[role="navigation"] ul.cbp-tm-submenu > li > a {
/*padding: 5px 2.3em 5px 0.6em; *//* top/bottom paddings in 'em' cause a tiny "jump" in Chrome on Win */
/*padding: 5px 2.3em 5px 0.6em; *//* top/bottom paddings in 'em' cause a tiny "jump" in Chrome on Win */
display: block;
display: block;
font-size: 1.1em;
font-size: 1.1em;
position: relative;
position: relative;
-
color: #17c4bb;
+
color: #68afbc;
-
border: 4px solid #fcf7e0;
+
border: 4px solid #fbf4de;
-webkit-transition: all 0.2s;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-moz-transition: all 0.2s;
Line 164: Line 166:
}
}
-
  .no-touch .cbp-tm-submenu > li > a:hover,
+
.no-touch .cbp-tm-submenu > li > a:hover,
-
  .no-touch .cbp-tm-submenu > li > a:active {
+
.no-touch .cbp-tm-submenu > li > a:active {
-
color: #fcf7e0;
+
color: #fbf4de;
-
background: #17c4bb;
+
background: #68afbc;
}
}
/* the icons (main level menu icon and sublevel icons) */
/* the icons (main level menu icon and sublevel icons) */
-
  .cbp-tm-submenu li a:before,
+
.cbp-tm-submenu li a:before,
-
  .cbp-tm-menu > li > a:before {
+
.cbp-tm-menu > li > a:before {
font-family: 'cbp-tmicons';
font-family: 'cbp-tmicons';
speak: none;
speak: none;
Line 186: Line 188:
}
}
-
  .cbp-tm-submenu li a:before {
+
.cbp-tm-submenu li a:before {
position: absolute;
position: absolute;
top: 50%;
top: 50%;
Line 193: Line 195:
}
}
-
  .cbp-tm-menu > li > a:not(:only-child):before {
+
.cbp-tm-menu > li > a:not(:only-child):before {
font-size: 60%;
font-size: 60%;
opacity: 0.3;
opacity: 0.3;
Line 201: Line 203:
/* Media Queries */
/* Media Queries */
-
  @media screen and (max-width: 55.6875em) {
+
@media screen and (max-width: 55.6875em) {
.cbp-tm-menu,.cbp-tm-menu ul {
.cbp-tm-menu,.cbp-tm-menu ul {
list-style: none;
list-style: none;
Line 210: Line 212:
.footer{font-size:60%;}
.footer{font-size:60%;}
}
}
-
  @media screen and (max-height: 25.25em) {
+
@media screen and (max-height: 25.25em) {
.cbp-tm-menu {
.cbp-tm-menu {
font-size: 40%;}}
font-size: 40%;}}
-
  @media screen and (max-height: 25.25em) and screen (max-width: 44.3125em){
+
@media screen and (max-height: 25.25em) and (max-width: 44.3125em){
.cbp-tm-menu {position: relative;
.cbp-tm-menu {position: relative;
text-align: center;
text-align: center;
Line 224: Line 226:
display: block;
display: block;
margin: 0;
margin: 0;
-
border-bottom: 4px solid #3793ca;
+
border-bottom: 4px solid #68afbc;
}
}
.cbp-tm-menu > li:first-child {
.cbp-tm-menu > li:first-child {
-
border-top: 4px solid #3793ca;
+
border-top: 4px solid #68afbc;
}
}
Line 235: Line 237:
.no-touch .cbp-tm-menu > li > a:active {
.no-touch .cbp-tm-menu > li > a:active {
color: #fff;
color: #fff;
-
background: #02639d;
+
background: #68afbc;
}
}
Line 256: Line 258:
padding: 0.6em 2.3em 0.6em 0.6em;
padding: 0.6em 2.3em 0.6em 0.6em;
border: none;
border: none;
-
border-bottom: 2px solid #6fbbe9;
+
border-bottom: 2px solid #68afbc;
}
}

Latest revision as of 16:09, 12 October 2014

/* reset list style */ .cbp-tm-menu, .cbp-tm-menu ul { list-style: none;

       font-size:1.1em;

}

/* set menu position; change here to set to relative or float, etc. */ .cbp-tm-menu { display: block; z-index: 1000; /*position: absolute; bottom: 0; width: 100%; background: #68afbc; text-align: right; padding: 0 2em; margin: 0;*/ text-transform: capitalize; }

/* first level menu items */ .cbp-tm-menu > li { display: inline-block; margin: 0 2.6em; position: relative; }

.cbp-tm-menu > li > a { line-height: 4em; padding: 0 0.3em; font-size: 1.2em; display: block; color: #fbf4de; }

.no-touch .cbp-tm-menu > li > a:hover, .no-touch .cbp-tm-menu > li > a:active { color: #fbf4de; }

/* sumbenu with transitions */ .cbp-tm-submenu { position: absolute; display: block; visibility: hidden; opacity: 0; padding: 0; text-align: left; pointer-events: none; -webkit-transition: visibility 0s, opacity 0s; -moz-transition: visibility 0s, opacity 0s; transition: visibility 0s, opacity 0s; }

.cbp-tm-show .cbp-tm-submenu { width: 16em; left: 50%; margin: 0 0 0 -8em; opacity: 1; visibility: visible; pointer-events: auto; -webkit-transition: visibility 0s, opacity 0.3s; -moz-transition: visibility 0s, opacity 0.3s; transition: visibility 0s, opacity 0.3s; }

.cbp-tm-show-above .cbp-tm-submenu { bottom: 100%; padding-bottom: 10px; }

.cbp-tm-show-below .cbp-tm-submenu { top: 100%; padding-top: 10px; }

/* extreme cases: not enough space on the sides */ .cbp-tm-nospace-right .cbp-tm-submenu { right: 0; left: auto; }

.cbp-tm-nospace-left .cbp-tm-submenu { left: 0; }

/* last menu item has to fit on the screen */ .cbp-tm-menu > li:last-child .cbp-tm-submenu { right: 0; }

/* arrow: depending on where the menu will be shown, we set the right position for the arrow

  • /

.cbp-tm-submenu:after { border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none;

}

.cbp-tm-show-above .cbp-tm-submenu:after { top: 100%; margin-top: -10px; }

.cbp-tm-show-below .cbp-tm-submenu:after { bottom: 100%; margin-bottom: -10px; }

.cbp-tm-submenu:after { border-color: transparent; border-width: 16px; margin-left: -16px; left: 50%; }

.cbp-tm-show-above .cbp-tm-submenu:after { border-top-color: #fbf4de; }

.cbp-tm-show-below .cbp-tm-submenu:after { border-bottom-color: #fbf4de; }

[role="navigation"] ul.cbp-tm-submenu > li { width: 100%; display: block; background: #fbf4de; }

[role="banner"].sticky ul.cbp-tm-submenu > li { width: 100%; display: block; background: #fbf4de; padding: 0 !important;

}


[role="banner"].sticky ul.cbp-tm-menu li:nth-of-type(2) .cbp-tm-submenu { left: 35%; }

[role="banner"].sticky ul.cbp-tm-menu li:nth-of-type(3) .cbp-tm-submenu { left: 65%; }

[role="navigation"] ul.cbp-tm-submenu > li > a { /*padding: 5px 2.3em 5px 0.6em; *//* top/bottom paddings in 'em' cause a tiny "jump" in Chrome on Win */ display: block; font-size: 1.1em; position: relative; color: #68afbc; border: 4px solid #fbf4de; -webkit-transition: all 0.2s; -moz-transition: all 0.2s; transition: all 0.2s; }

.no-touch .cbp-tm-submenu > li > a:hover, .no-touch .cbp-tm-submenu > li > a:active { color: #fbf4de;

background: #68afbc; }

/* the icons (main level menu icon and sublevel icons) */ .cbp-tm-submenu li a:before, .cbp-tm-menu > li > a:before { font-family: 'cbp-tmicons'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; vertical-align: middle; margin-right: 0.6em; -webkit-font-smoothing: antialiased; }

.cbp-tm-submenu li a:before { position: absolute; top: 50%; margin-top: -0.5em; right: 0.5em; }

.cbp-tm-menu > li > a:not(:only-child):before { font-size: 60%; opacity: 0.3; }


/* Media Queries */ @media screen and (max-width: 55.6875em) { .cbp-tm-menu,.cbp-tm-menu ul { list-style: none; } .cbp-tm-menu { font-size: 48%; } .footer{font-size:60%;} } @media screen and (max-height: 25.25em) { .cbp-tm-menu { font-size: 40%;}} @media screen and (max-height: 25.25em) and (max-width: 44.3125em){ .cbp-tm-menu {position: relative; text-align: center; padding: 0; top: auto; visibility:visible; }

.cbp-tm-menu > li { display: block; margin: 0; border-bottom: 4px solid #68afbc; }

.cbp-tm-menu > li:first-child { border-top: 4px solid #68afbc; }

li.cbp-tm-show > a, .no-touch .cbp-tm-menu > li > a:hover, .no-touch .cbp-tm-menu > li > a:active { color: #fff; background: #68afbc; }

.cbp-tm-submenu { position: relative; display: none; width: 100%; visibility:visible; transition:auto; -webkit-transition: auto; -moz-transition: auto; }

.cbp-tm-submenu > li { padding: 0;

}

.cbp-tm-submenu > li > a { padding: 0.6em 2.3em 0.6em 0.6em; border: none; border-bottom: 2px solid #68afbc; }

.cbp-tm-submenu:after { display: none; }

.cbp-tm-menu .cbp-tm-show .cbp-tm-submenu { display: block; width: 100%; left: 0; margin: 0; padding: 0; bottom: auto; top: auto; } }