Skip to content

14 - 动态CSS #3130

@ab15173636319

Description

@ab15173636319
<script setup> import { ref } from "vue" const theme = ref("red") const colors = ["blue", "yellow", "red", "green"] setInterval(() => { theme.value = colors[Math.floor(Math.random() * 4)] }, 1000) </script>

hello

<style scoped> /* Modify the code to bind the dynamic color */ p { color: red } </style>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions