Skip to content

Repository files navigation

🎨 autobg

中文

npm version

This is a CSS utility library that automatically generates background-image, width, and height styles for elements based on local image paths.

💡 Iterated from the littlee/autobg.macro

🚀 Features

  • 🖼️ Automatically generates styles that respect the original aspect ratio of images
  • 🛠️ Supports multiple integration methods:
  • 🔄 Fully compatible with webpack and vite
  • 🔗 Supports relative path image imports in unocss and vite unocss #1397
  • 📏 Supports custom style units in babel macro

📖 Usage

For detailed usage instructions, please check the corresponding documentation:

📄 License

MIT

About

Set the width and height of elements based on the background image, supporting unocss and babel macro.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages