开发者

How can be CSS used to style web pages meant to be served by Lift when Lift uses CSS classes for the purpose of its own?

开发者 https://www.devze.com 2023-04-12 13:44 出处:网络
Lift framework seems to use class=\"lift:something\" in HTML tags but what if I want to apply some 开发者_如何学Cordinary CSS to this tag and want it to have an ordinary class name?Each HTML element c

Lift framework seems to use class="lift:something" in HTML tags but what if I want to apply some 开发者_如何学Cordinary CSS to this tag and want it to have an ordinary class name?


Each HTML element can have multiple classes separated by spaces, e.g.

<div class="lift:something something-else"></div>

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 divs, and select based on those:

<div class="something">
    <div class="lift:something"></div>
</div>


you can use many classes in dom elements:

<div class="lift:something my_extra_css_class">

Or, if the styling is meant to be unique, you can use an id and style the id and not the class:

html:
<div class="lift:something" id='my_id'>

css:
#my_id{
  bla: blabla;
  foo: bar;
  fruit: banana;
  codfish: sausage;
  car: garage;
  cash: atm;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消