CSS data attribute new line character & pseudo-element content value

前端 未结 4 1982
臣服心动
臣服心动 2020-11-27 05:36

Is it possible to have a new line in a data attribute ?

I am trying to do something like this:

CSS:

[         


        
4条回答
  •  青春惊慌失措
    2020-11-27 05:42

    ...and if you're trying to figure this out and happen to be using HAML and AngularJS then use \n.

    %a.tooltip{:"data-tip" => "Cost Per Unit: {{humanized_cost}} \n(Calculated for applicable Feature Qty.) "}
    

    results in:

    Cost Per Unit: $10.54
    (Calculated for applicable Feature Qty.)
    

提交回复
热议问题