Difference between revisions of "Template:Team:Freiburg/wiki content start bubble"
(24 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
#bubble_wrapper { | #bubble_wrapper { | ||
float:left; | float:left; | ||
− | margin: | + | margin: 0; |
+ | margin-left: 40px; | ||
+ | margin-top: 140px; | ||
/*position: fixed; top: 10%; */ | /*position: fixed; top: 10%; */ | ||
position:fixed; | position:fixed; | ||
Line 29: | Line 31: | ||
#bubble_sidebar { | #bubble_sidebar { | ||
− | + | z-index: 600; | |
} | } | ||
Line 39: | Line 41: | ||
zoom: 1; | zoom: 1; | ||
*display: inline; | *display: inline; | ||
+ | font-size: 70%; | ||
+ | font-family: Roboto; | ||
} | } | ||
Line 51: | Line 55: | ||
.bubble1 { | .bubble1 { | ||
− | width: | + | width: 80px; |
− | height: | + | height: 80px; |
+ | margin-left: -25px; | ||
} | } | ||
.bubble1 span { | .bubble1 span { | ||
− | height: | + | height: 80px; |
} | } | ||
.bubble2 { | .bubble2 { | ||
− | width: | + | width: 110px; |
− | height: | + | height: 110px; |
− | margin-left: | + | margin-left: -15px; |
} | } | ||
.bubble2 span { | .bubble2 span { | ||
− | height: | + | height: 110px; |
} | } | ||
.bubble3 { | .bubble3 { | ||
− | width: | + | width: 60px; |
− | height: | + | height: 60px; |
− | margin-left: | + | margin-left: -30px; |
margin-top: 5px; | margin-top: 5px; | ||
} | } | ||
.bubble3 span { | .bubble3 span { | ||
− | height: | + | height: 60px; |
+ | } | ||
+ | |||
+ | @media screen and (max-width: 1279px){ | ||
+ | #bubble_wrapper{ | ||
+ | display: none; | ||
+ | } | ||
} | } | ||
Line 86: | Line 97: | ||
<script> | <script> | ||
+ | $().ready(function() { | ||
+ | $(function() { | ||
+ | $.fn.scrollBottom = function() { | ||
+ | return $(document).height() - this.scrollTop() - this.height(); | ||
+ | }; | ||
− | + | var $el = $('#bubble_wrapper>div'); | |
− | + | var $window = $(window); | |
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | $window.bind("scroll resize", function() { | |
− | + | var gap = $window.height() - $el.height() - 370; | |
− | + | var visibleFoot = 172 - $window.scrollBottom(); | |
− | + | var scrollTop = $window.scrollTop() | |
− | + | ||
− | + | ||
− | + | ||
− | + | if (scrollTop > $document.height() - $window.height() -370){ | |
− | $ | + | $el.css({ |
+ | top: (172 - scrollTop) + "px", | ||
+ | bottom: "auto" | ||
+ | }); | ||
} | } | ||
}); | }); | ||
− | + | }); | |
− | + | }); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Line 139: | Line 133: | ||
<div id="bubble_wrapper"> | <div id="bubble_wrapper"> | ||
<div id="bubble_sidebar" class="bubble1"> | <div id="bubble_sidebar" class="bubble1"> | ||
− | <span></span><p><a href=""></a></p> | + | <span></span><p><a id="bubble1" href=""><img id="bubble1_img" src=""></a></p> |
</div> | </div> | ||
<div id="bubble_sidebar" class="bubble2"> | <div id="bubble_sidebar" class="bubble2"> | ||
− | <span></span><p><a href=""></a></p> | + | <span></span><p><a id="bubble2" href="#firstHeading">text</a></p> |
</div> | </div> | ||
<div id="bubble_sidebar" class="bubble3"> | <div id="bubble_sidebar" class="bubble3"> | ||
− | <span></span><p><a href=""></a></p> | + | <span></span><p><a id="bubble3" href="">next</a></p> |
</div> | </div> | ||
</div> | </div> | ||
− | + | <div class="background_image_left"><img src="https://static.igem.org/mediawiki/2015/8/85/Freiburg_wiki_background_2_parted_left.png"></div> | |
− | + | <div class="background_image_right"><img src="https://static.igem.org/mediawiki/2015/f/f4/Freiburg_wiki_background_2_parted_right.png"></div> | |
<div class="page_content"> | <div class="page_content"> | ||
</html> | </html> |
Latest revision as of 02:58, 19 September 2015