"; 2. Use the style and transform attributes to enlarge the image, the syntax ""."/> "; 2. Use the style and transform attributes to enlarge the image, the syntax "".">

Home  >  Article  >  Web Front-end  >  How to enlarge pictures in html

How to enlarge pictures in html

WBOY
WBOYOriginal
2021-12-23 14:24:3017123browse

Method: 1. Use the width and height attributes to enlarge the image, the syntax "How to enlarge pictures in html"; 2. Use the style and transform attributes to enlarge the image, the syntax "How to enlarge pictures in html".

How to enlarge pictures in html

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

How to enlarge pictures in html

There are two ways to enlarge pictures in html

One is to reset The height and width of the picture element, this time the width and height attributes are used.

The second method is to use the style attribute and transform attribute to set the magnification of the picture element.

The example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <img  src="1115.How to enlarge pictures in html"    style="max-width:90%"How to enlarge pictures in html" >
    <img  src="1115.How to enlarge pictures in html"   style="max-width:90%" alt="How to enlarge pictures in html" >
</body>
</html>

Output result:

How to enlarge pictures in html

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to enlarge pictures in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn