이미지 텍스트

· 8년 전 · 2006

이미지 텍스트


a5f7f8f597f4518879184905bd3bf336_1504239098_2617.png
 


이미지 텍스트



[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에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
CSS 8년 전 조회 1,630
CSS 8년 전 조회 1,867
CSS 8년 전 조회 1,680
CSS 8년 전 조회 1,549
CSS 8년 전 조회 1,899
CSS 8년 전 조회 1,487
CSS 8년 전 조회 1,632
CSS 8년 전 조회 1,682
CSS 8년 전 조회 1,710
CSS 8년 전 조회 1,530
CSS 8년 전 조회 4,192
CSS 8년 전 조회 2,129
CSS 8년 전 조회 2,527
CSS 8년 전 조회 2,076
CSS 8년 전 조회 2,007
CSS 8년 전 조회 1,851
CSS 8년 전 조회 2,148
CSS 8년 전 조회 1,912
CSS 8년 전 조회 2,040
CSS 8년 전 조회 2,441
CSS 8년 전 조회 1,772
CSS 8년 전 조회 2,350
CSS 8년 전 조회 1,793
CSS 8년 전 조회 1,579
CSS 8년 전 조회 1,269
CSS 8년 전 조회 1,604
CSS 8년 전 조회 2,369
CSS 8년 전 조회 2,043
CSS 8년 전 조회 1,797
CSS 8년 전 조회 1,763
🐛 버그신고