How to only do CSS styling for one slide? #440
-
Hey! I just started using Marp. I know that CSS styling works, but I want to know how to only apply styling to one slide. For example: # Slide 1
foo
---
<style>
h1 {
color: black
}
</style>
# Slide 2
bar I would like the Any response would be well appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try using |
Beta Was this translation helpful? Give feedback.
<style>
tag is working same as HTML, setting styles for the whole of the document.Try using
<style scoped>
instead. Marp provides the support ofscoped
attribute for<style>
to limit the effect of styles to the current slide.https://marpit.marp.app/theme-css?id=scoped-style.