html - How to make Floating Action Button / Content overlap two divs in MaterializeCSS -
i looking @ materializecss showcase (materializecss.com/showcase.html), , saw feature wanted incorporate website. wanted able make card, picture, button, etc. able overlap on 2 divs (or sections).
for example: http://prntscr.com/bezcgo or http://prntscr.com/bezd7s or prntscr.com/bezdvx
apparently picture different live website, there same idea looking for. in first picture, "hyperapi" picture overlaps both blue , white parts. second picture, yellow down arrow overlaps blue , white. thirdly, red down arrow overlaps light blue , white areas.
just clarifying, know how using materializecss framework (materializecss.com).
thanks! also, couldn't post more 2 links had break them (sorry d:)!
that pretty popular effect :)
we negative margins image , eqiuvalent padding header...
css
.overlap-header { padding: 25px 25px 125px; /* bottom padding has 100px */ text-align: center; background: #333; color: #fff; position: relative; } .half-out-button { position: absolute; bottom: 0; right: 5%; height: 70px; width: 70px; border-radius: 50%; margin-bottom: -35px; /* change */ } .overlap-img { position: relative; display: block; max-width: 80%; margin: -100px auto 25px; /* top margin -100px */ }
html - button
<div class="overlap-header"> <h1>awesome overlapping</h1> <button class="half-out-button"> half out! </button> </div>
html - image
<div class="overlap-header"> <h1>awesome overlapping</h1> </div> <img src="https://pixabay.com/static/uploads/photo/2016/04/25/23/53/euro-1353420_960_720.jpg" class="overlap-img">
here's codepen http://codepen.io/shramee/pen/zbreln
Comments
Post a Comment