0
Someone knows a way to simulate a "min-top
" in an element? Maybe using JS or Jquery...
I’m using the scale()
in an object, but the function causes the element to change position.
I would like you to apply scale()
the object always stays below this element of position Absolute... It would be possible ?
<style type="text/css">
.papel {width: 297mm;height: 210mm; background-color:#CCC;border: 3px solid gray;top: -45%;left: 0%;position: absolute; overflow:hidden;transform:scale(0.5) translate3d(0px,0px,0px); margin-bottom: 80px;transform: translate3d(73px,521px,0px);}
.mover{position:absolute; cursor:move;}
#menu{width:100%;height:150px;background-color:blue;}
</style>
<div id="range-input">
<input type="range" id="zoompapel" min="0.1" max="1" step="0.1" />
</div>
<div id="menu">
MENU SUPERIOR
</div>
<div class="papel mover" id="papel">
TESTE
</div>
<script src="js/jquery-1.10.2.js"></script>
<script type="text/javascript">
$('#zoompapel').change(function(event) {
var value = $('#zoompapel').val();
$('#papel').css({
'-webkit-transform' : 'scale(' + value + ')',
'-moz-transform' : 'scale(' + value + ')',
'-ms-transform' : 'scale(' + value + ')',
'-o-transform' : 'scale(' + value + ')',
'transform' : 'scale(' + value + ')'});
$("#papel").css('position','absolute');
});
</script>
pass the code and help, there are several advanced css min, see also SASS.
– KingRider
@Kingrider Displayed the code for better understanding... Wouldn’t want the paper div to exceed the div menu...
– user48796
_user48796: I saw code, why are you using val() ? and see position difference http://i.imgur.com/X2mobbg.png ... you want animation move mouse to open menu side box is that it? I can do for you.
– KingRider