Html – How do I check if the width of the image is > 80% and if it is, set width to 80% in JavaScript?
My HTML is this: <!DOCTYPE html> <html lang="en"> <meta charset="UTF-8"> <title>Aerocello</title> <meta name="viewport" content="width=device-width,initial-scale=1"> <link rel="stylesheet" href="stylesheet.css"> <body> <div class="gallery" *ngFor="let image of images; let i = index;"> <img src="logo2.png" alt="logo" class="centre"> <script> // if (what goes here?) { //…