awesome-obsidian
awesome-obsidian copied to clipboard
Enlarge on hover CSS
/* Apply styles to images with alt text containing "enlarge" */
.markdown-preview-view img[alt*="enlarge"] {
display: block;
margin-left: auto;
margin-right: auto;
transition: transform 0.25s ease;
}
/* Hover effect on images with alt text containing "enlarge" */
.markdown-preview-view img[alt*="enlarge"]:hover {
-webkit-transform: scale(1.8); /* experiment with values */
transform: scale(2);
}
It only targets links with the "enlarge" tag.
How to use:

or

This allows the user to set a default size and still have the enlarged hover effect.