Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const watermarkDiv = document.createElement('div');
- watermarkDiv.style = `
- position: fixed;
- margin: 15px;
- bottom: 0;
- left: 0;
- width: 200px;
- height: 80px;
- border-radius: 15px;
- background-color: rgba(0, 0, 0, 0.5);
- `;
- const watermarkTextTitle = document.createElement('div');
- watermarkTextTitle.style = `
- position: absolute;
- top: 10px;
- left: 0;
- width: 100%;
- text-align: center;
- font-size: 16px;
- font-weight: bold;
- color: white;
- font-family: Arial, sans-serif;
- `;
- watermarkTextTitle.textContent = 'Title';
- const watermarkTextDescription = document.createElement('div');
- watermarkTextDescription.style = `
- position: absolute;
- top: 30px;
- left: 0;
- width: 100%;
- text-align: center;
- font-size: 12px;
- font-weight: normal;
- color: white;
- font-family: Arial, sans-serif;
- `;
- watermarkTextDescription.textContent = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vestibulum commodo velit.';
- watermarkDiv.appendChild(watermarkTextTitle);
- watermarkDiv.appendChild(watermarkTextDescription);
- document.body.appendChild(watermarkDiv);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement