Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Scaling elements proportionally using CSS and JQUERY3

$('.box').css('transform','scale(.6)');
console.log($('.box').width())
Comment

Scaling elements proportionally using CSS and JQUERY3

.box{
width:100px;
height:100px;
background:#000;
}
Comment

Scaling elements proportionally using CSS and JQUERY

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class='box'></div>
Comment

Scaling elements proportionally using CSS and JQUERY3

let scale = .6;
let w = $('.box').width() * scale;
let h = $('.box').height() * scale;
$('.box').css({'height' : h, 'width' : w})
console.log($('.box').width())
Comment

PREVIOUS NEXT
Code Example
Javascript :: remove symbols from cnpj js 
Javascript :: adding to an array in js 
Javascript :: ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(AuthModule)[AuthService - AuthService - AngularFirestore - InjectionToken 
Javascript :: upsert typeorm 
Javascript :: JSON.stringify on Arrays adding numeric keys for each array value 
Javascript :: PAN SNAP 
Javascript :: Get value by key from json array 
Javascript :: Connect session middleware - regenerate vs reload 
Javascript :: assign-only-if-property-exists-in-target-object 
Javascript :: nextjs app wdyr 
Javascript :: javascript encriment +1 
Javascript :: echarts js 
Javascript :: how to set socket io into global express 
Javascript :: javasrccipt loop array 
Javascript :: Add Imaginary Property To Object 
Javascript :: Accessing Our CryptoCurrency blockchain through local server 
Javascript :: ms dyn crm associate n:m record js 
Javascript :: photoshop Change image size JavaScript 
Javascript :: react antd modal with quill 
Javascript :: detect sound chrome extension every 1 second 
Javascript :: Recursion In A Class Function 
Javascript :: prisma usersWithZeroPosts 
Javascript :: Jquery works only on double click 
Javascript :: button style when clicked and unclicked react material 
Javascript :: angular service await for data 
Javascript :: clear an array 
Javascript :: radio button remove checked 
Javascript :: react tutorial app 
Javascript :: onhover 
Javascript :: math.ceil node js 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =