테스트 사이트 - 개발 중인 베타 버전입니다

반응 형 이미지

· 8년 전 · 2122
스크린샷 2017-09-22 오후 8.31.47.png
반응 형 이미지

이미지는 모든 크기로 제공됩니다. 그렇게 스크린. 반응 형 이미지는 화면 크기에 맞게 자동으로 조정됩니다.

태그에 .img-responsive클래스를 추가하여 반응이 빠른 이미지를 만듭니다 <img>. 그러면 이미지가 부모 요소에 맞게 확장됩니다.

.img-responsive클래스는 적용 display: block;및 max-width: 100%;및 height: auto;이미지에 :


<img class="img-responsive" src="img_chania.jpg" alt="Chania">




<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
<h2>Image</h2>
<p>The .img-responsive class makes the image scale nicely to the parent element (resize the browser window to see the effect):</p>
<img class="img-responsive" src="img_chania.jpg" alt="Chania" width="460" height="345">
</div>

</body>
</html>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
1547
1546
1545
1544
1542
1541
1540
1539
1538
1537
1535
1534
1533
1532
1531
1512
1508
1479
1478
1475
1474
1460
1459
부트스트랩 드롭 다운 헤더 7
1458
1457
1456
1455
1454
부트스트랩 부트스트랩 panel
1453
1452