Bvural41 1
Bvural41
Mt2Hizmet 1
Mt2Hizmet
SLyFeLLowTR 1
SLyFeLLowTR
DEVLOPER 1
DEVLOPER
noisiv 1
noisiv
Manwe Work 1
Manwe Work
mavzermete 1
mavzermete
Hikaye Ekle

HTML CSS ile Resim Üzerinde Şeffaf Metin Yazısı Oluşturma..

  • Konuyu başlatan Konuyu başlatan ByESiNTi
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 6
  • Görüntüleme Görüntüleme 1K

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

CSS kullanarak şeffaf (içini görebileceğiniz) bir arka plan metniyle nasıl bir görüntü oluşturacağınızı gösterelim..



Kod:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
  box-sizing: border-box;
}

body {
  font-family: Arial;
  font-size: 17px;
}

.container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.container img {vertical-align: middle;}

.container .content {
  position: absolute;
  bottom: 0;
  background: rgb(0, 0, 0); /* Fallback color */
  background: rgba(0, 0, 0, 0.5); /* Black background with 0.5 opacity */
  color: #f1f1f1;
  width: 100%;
  padding: 20px;
}
</style>
</head>
<body>

<h2>Responsive Image with Transparent Text</h2>

<div class="container">
  <img src="/w3images/notebook.jpg" alt="Notebook" style="width:100%;">
  <div class="content">
    <h1>Heading</h1>
    <p>Lorem ipsum dolor sit amet, an his etiam torquatos. Tollit soleat phaedrum te duo, eum cu recteque expetendis neglegentur. Cu mentitum maiestatis persequeris pro, pri ponderum tractatos ei.</p>
  </div>
</div>

</body>
</html>


Şeffaf Resim Metni Nasıl Oluşturulur

Adım 1) HTML'yi ekleyin:


Kod:
<div class="container">
  <img src="notebook.jpg" alt="Notebook" style="width:100%;">
  <div class="content">
    <h1>Heading</h1>
    <p>Lorem ipsum..</p>
  </div>
</div>

Adım 2) CSS'yi ekleyin:

Kod:
.container {
  position: relative;
  max-width: 800px; /* Maximum width */
  margin: 0 auto; /* Center it */
}

.container .content {
  position: absolute; /* Position the background text */
  bottom: 0; /* At the bottom. Use top:0 to append it to the top */
  background: rgb(0, 0, 0); /* Fallback color */
  background: rgba(0, 0, 0, 0.5); /* Black background with 0.5 opacity */
  color: #f1f1f1; /* Grey text */
  width: 100%; /* Full width */
  padding: 20px; /* Some padding */
}


 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst