शीर्षक
Lorem ipsum dolor sit amet, an his etiam torquatos.
CSS के द्वारा स्पष्ट (अर्ध-स्पष्ट) पृष्ठभूमि वाले लेख वाली छवि कैसे बनाएं।
Lorem ipsum dolor sit amet, an his etiam torquatos.
<div class="container"> <img src="notebook.jpg" alt="Notebook" style="width:100%;"> <div class="content"> <h1>शीर्षक</h1> <p>Lorem ipsum..</p> </div> </div>
.container { position: relative; max-width: 800px; /* अधिकतम चौड़ाई */ margin: 0 auto; /* इसे केंद्रित करें */ } .container .content { position: absolute; /* पृष्ठभूमि लेख स्थानीयकरण */ bottom: 0; /* नीचे।top:0 का उपयोग करके इसे शीर्ष पर जोड़ें */ background: rgb(0, 0, 0); /* पिछला रंग */ background: rgba(0, 0, 0, 0.5); /* 0.5 अस्पष्टता वाला श्वेत पृष्ठभूमि */ color: #f1f1f1; /* ग्रे लेख */ width: 100%; /* पूर्ण चौड़ाई */ padding: 20px; /* 一些内边距 */ }