이미지 텍스트
이미지 텍스트

이미지 텍스트
[Top Left] 소스
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
}
.topleft {
position: absolute;
top: 8px;
left: 16px;
font-size: 18px;
}
img {
width: 100%;
height: auto;
opacity: 0.3;
}
</style>
</head>
<body>
<h2>Image Text</h2>
<p>Add some text to an image in the top left corner:</p>
<div class="container">
<img src="trolltunga.jpg" alt="Norway" width="1000" height="300">
<div class="topleft">Top Left</div>
</div>
</body>
</html>
[Right Top]
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
}
.topright {
position: absolute;
top: 8px;
right: 16px;
font-size: 18px;
}
img {
width: 100%;
height: auto;
opacity: 0.3;
}
</style>
</head>
<body>
<h2>Image Text</h2>
<p>Add some text to an image in the top right corner:</p>
<div class="container">
<img src="trolltunga.jpg" alt="Norway" width="1000" height="300">
<div class="topright">Top Right</div>
</div>
</body>
</html>
[Bottom Left]
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
}
.bottomleft {
position: absolute;
bottom: 8px;
left: 16px;
font-size: 18px;
}
img {
width: 100%;
height: auto;
opacity: 0.3;
}
</style>
</head>
<body>
<h2>Image Text</h2>
<p>Add some text to an image in the bottom left corner:</p>
<div class="container">
<img src="trolltunga.jpg" alt="Norway" width="1000" height="300">
<div class="bottomleft">Bottom Left</div>
</div>
</body>
</html>
[Bottom Right]
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
}
.bottomright {
position: absolute;
bottom: 8px;
right: 16px;
font-size: 18px;
}
img {
width: 100%;
height: auto;
opacity: 0.3;
}
</style>
</head>
<body>
<h2>Image Text</h2>
<p>Add some text to an image in the bottom right corner:</p>
<div class="container">
<img src="trolltunga.jpg" alt="Norway" width="1000" height="300">
<div class="bottomright">Bottom Right</div>
</div>
</body>
</html>
[Center]
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
}
.center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 18px;
}
img {
width: 100%;
height: auto;
opacity: 0.3;
}
</style>
</head>
<body>
<h2>Image Text</h2>
<p>Center text in image:</p>
<div class="container">
<img src="trolltunga.jpg" alt="Norway" width="1000" height="300">
<div class="center">Centered</div>
</div>
</body>
</html>
게시판 목록
퍼블리셔팁
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 1097 | CSS | 8년 전 | 2183 | ||
| 1096 | CSS | 8년 전 | 2100 | ||
| 1095 | CSS | 8년 전 | 3594 | ||
| 1094 | CSS | 8년 전 | 2275 | ||
| 1093 | CSS | 8년 전 | 1501 | ||
| 1092 | CSS | 8년 전 | 1791 | ||
| 1091 | CSS | 8년 전 | 1954 | ||
| 1090 | CSS | 8년 전 | 1917 | ||
| 1089 | HTML | 8년 전 | 4415 | ||
| 1088 | CSS | 8년 전 | 1474 | ||
| 1087 | CSS | 8년 전 | 1600 | ||
| 1086 | CSS | 8년 전 | 1509 | ||
| 1085 | CSS | 8년 전 | 1530 | ||
| 1084 | CSS | 8년 전 | 1246 | ||
| 1083 | CSS | 8년 전 | 1056 | ||
| 1082 | CSS | 8년 전 | 2156 | ||
| 1081 | CSS | 8년 전 | 1958 | ||
| 1080 | CSS | 8년 전 | 1918 | ||
| 1079 | CSS | 8년 전 | 1967 | ||
| 1078 | CSS | 8년 전 | 1662 | ||
| 1077 | CSS | 8년 전 | 1685 | ||
| 1076 | CSS | 8년 전 | 2025 | ||
| 1075 | CSS | 8년 전 | 1880 | ||
| 1074 | CSS | 8년 전 | 1693 | ||
| 1073 | CSS | 8년 전 | 1541 | ||
| 1072 | CSS | 8년 전 | 1625 | ||
| 1071 | CSS | 8년 전 | 2024 | ||
| 1070 | CSS | 8년 전 | 1596 | ||
| 1069 | CSS | 8년 전 | 1833 | ||
| 1068 | CSS | 8년 전 | 1636 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기