vitepress
vitepress copied to clipboard
Resize hero image
Is there any way to resize the img that i have configured in docs/index.md/hero ?
You should add custom css and overwrite it. Target:
.VPHero .image {
max-width: 480px;
}
You should also overwrite media query on different screen size too. So basically, it' better to resize your image instead of CSS. If you want to make it smaller, add transparent padding to your image.
I think adding config option to resize the image is a bit hard because of media query break points we have. It would be better to have some solid guideline on how to place good image on default theme.
Which is make the image aspect ratio square. Adjust paddings of the image to get the best result. And I think we could add this to docs 👀
thank you so much for replying to me so quickly and this did solve the problem that was bothering me.I also think we should add this to docs :smiley:
Let's track the docs thing at #1773