A virtual teacher who reveals to you the great secrets of Base64

cursor

The cursor property indicates which mouse cursor will be displayed when the mouse pointer is over the element. The image for cursor property can be specified as URL-address or as data URI of the image.

For example, you can use a 5x5 GIF image to set a red cross as cursor and use “crosshair” as fallback:

.base64-url {
  cursor: url("//static.base64.guru/uploads/images/5x5.gif"), crosshair
}

The same can be achieved by encoding image to Base64 and embedding it using data URI:

.base64-data {
  cursor: url("data:image/gif;base64,R0lGODdhBQAFAPABAP////8AACwAAAAABQAFAAACCARihhe9q0wBADs="), crosshair
}

Both behaviors are identical — when you open the page, your browser sets the same cursor for both elements. The difference is that in the first case the browser sends one HTTP request to fetch the external image, when in the second case the image is already loaded in the browser’s memory and it does not need to send any HTTP requests.

Please note that Base64 Data URIs have some limitations. In addition, like almost any unconventional solutions, it has both advantages and disadvantages. Therefore, if you plan to use it, first of all, read about Base64 Data URI.

Comments (21)

I hope you enjoy this discussion. In any case, I ask you to join it.

  • nqhXncMU,
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • nqhXncMU,
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • nqhXncMU,
    555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • nqhXncMU,
    cihDcEMV' OR 328=(SELECT 328 FROM PG_SLEEP(15))--
  • nqhXncMU,
    555*468*463*0
  • nqhXncMU,
    GNtWv7vW')) OR 114=(SELECT 114 FROM PG_SLEEP(15))--
  • gBqsPxAZ,
    mXPk8Nag') OR 802=(SELECT 802 FROM PG_SLEEP(15))--
  • nqhXncMU,
    1 waitfor delay '0:0:15' --
  • gBqsPxAZ,
    555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  • gBqsPxAZ,
    -1)) OR 783=(SELECT 783 FROM PG_SLEEP(15))--
  • nqhXncMU,
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • nqhXncMU,
    555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • nqhXncMU,
    0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
  • nqhXncMU,
    IQzdD6l1') OR 767=(SELECT 767 FROM PG_SLEEP(15))--
  • ncMUFCMU,
    555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • ncMUFCMU,
    EbtECKyO'; waitfor delay '0:0:15' --
  • nqhXncMU,
    lcvZNPAv') OR 429=(SELECT 429 FROM PG_SLEEP(15))--
  • nqhXncMU,
    if(now()=sysdate(),sleep(15),0)
  • ncMUFCMU,
    e13dwQOA'; waitfor delay '0:0:15' --
  • ncMUFCMU,
    555*607*602*0
  • Aileen,
    Don't Stop! 15 Things About Top British Pornstars We're Overheard only fans pornstars kayleigh wanless
Add new comment

If you have any questions, remarks, need help, or just like this page, please feel free to let me know by leaving a comment using the form bellow.
I will be happy to read every comment and, if necessary, I will do my best to respond as quickly as possible. Of course, spammers are welcome only as readers.