当 Lift 使用 CSS 类用于其自身目的时,如何使用 CSS 来设计由 Lift 提供的网页样式?
Lift 框架似乎在 HTML 标签中使用 class="lift:something"
但如果我想将一些普通的 CSS 应用于此标签并希望它有一个普通的类名怎么办?
Lift framework seems to use class="lift:something"
in HTML tags but what if I want to apply some ordinary CSS to this tag and want it to have an ordinary class name?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每个 HTML 元素可以有多个由空格分隔的类,例如,
您可以在样式表中定位这些类中的一个或多个。
如果 Lift 不允许您将自己的类应用于元素(我不是 Scala 程序员),您可能需要将类应用于其他元素,例如包装器
div
,并根据那些:Each HTML element can have multiple classes separated by spaces, e.g.
You can target one or more of those classes in your stylesheet.
If Lift doesn't let you apply your own classes to elements (I'm not a Scala programmer), you may need to apply classes to other elements instead, like wrapper
div
s, and select based on those:你可以在 dom 元素中使用许多类:
或者,如果样式是唯一的,你可以使用 id 并设置 id 的样式,而不是类:
you can use many classes in dom elements:
Or, if the styling is meant to be unique, you can use an id and style the id and not the class: