Loading

Blazor笔记-Component styles

更新记录

注意:非教程。纯笔记,日常查询用的。需要教程的小伙伴找几本书看看即可哈哈,有Vue基础的话非常快,概念都是通的。非工作需要不建议深入学习Blazor,深入Vue吧,用的多,哈哈。

完整目录地址:https://www.cnblogs.com/cqpanda/p/17596348.html

点击查看
2024年3月7日 发布。
2023年8月1日 迁移笔记到博客。

Component styles

In Blazor, there are many ways to add CSS to a component.

  • Global styles: applied to the entire application.
  • Scoped styles: applied only to the component they are defined in.
  • Internal CSS: defined within the component's template using the <style> tag.
  • External CSS: defined in a separate CSS file and imported into the component.
  • Inline CSS: defined directly on an element using the style attribute.

Scoped styles

在对应的组件同级建.css文件即可
image

posted @ 2024-03-07 15:30  重庆熊猫  阅读(3)  评论(0编辑  收藏  举报