We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any way to use png as background? and is it possible to add some effect at background by using css
from my expected image I have a background image (.PNG) and I want to add smoke effect by using css. is it possible?
The text was updated successfully, but these errors were encountered:
You could wrap your mdx page in a Background component.
add png or svg to /public/
/public/
Create component
// Background.js import React, { useState, useEffect } from "react" import { useTheme } from "nextra-theme-docs" const Background = ({ children }) => { const { resolvedTheme } = useTheme() const [backgroundImage, setBackgroundImage] = useState("") useEffect(() => { setBackgroundImage( resolvedTheme === "dark" ? "background/background_dark.svg" : "background/background_light.svg", ) }, [resolvedTheme]) return ( <> <div style={{ position: "fixed", top: 0, left: 0, width: "100%", height: "100%", zIndex: -1, backgroundImage: `url('${backgroundImage}')`, backgroundSize: "cover", backgroundRepeat: "no-repeat", backgroundPosition: "center", filter: "blur(6px)", }} /> {children} </> ) } export default Background
// index.mdx import Background from 'components/Background' <Background> # Documents ... </Background>
For animation, you can use an APNG or an svg from here as an example.
Sorry, something went wrong.
Thanks a lot!
No branches or pull requests
Is there any way to use png as background? and is it possible to add some effect at background by using css
This is my current page
This is my expectation
from my expected image I have a background image (.PNG) and I want to add smoke effect by using css. is it possible?
The text was updated successfully, but these errors were encountered: