Thanks for the cursor tutorial! In reviewing your instructions for the custom pointer, I saw that you emphasized that the svg file needs a width and height designated for the custom cursor to be visible. Where does the html that includes the width and height values for the svg go? Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Usually, the size of the SVG is selected when the SVG is created and as such is not needed to be specified.
Having said that, you can change the size of it though just by selecting the img and changing its width or height, again like you could a PNG or JPG.
Let’s say you have an image like so:
<img src="DigitalOcean.svg" alt="DigitalOcean SVG">
if you want to add height or width to is you can simply transform it to:
<img src="DigitalOcean.svg" alt="DigitalOcean SVG"width="500" height="600">
Now, if you want to add them as a class, you can do the following
<a href="/" class="logo">
DigitalOcean
</a>
.logo {
display: block;
text-indent: -9999px;
width: 100px;
height: 82px;
background: url(DigitalOcean.svg);
background-size: 100px 82px;
}
Hope this helps! Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.