Languages
[Edit]
EN

HTML - empty transparent one pixel gif image as Base64 Data URL (1x1 px image)

7 points
Created by:
Brett4
465

In this short article you will find 1x1 px transparent GIF image that you can use as background.

Quick solution (base64 encoded data URL):

data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==

Motication: in some web browsers transparent image is useful when we want to make element transparent.

 

Practical example

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <style>

    img {
        border: 1px solid silver;
        width: 100px;
        height: 100px;
    }

  </style>
  <img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" />
</body>
</html>

 

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join