简体   繁体   中英

No need to have underline in part of the txt

<div class="action btn-save">{{'SaveTitle' | translate}}({{row.box.length}})
</div>

.btn-save {
text-decoration: underline;
}

I have above code.. The result of it is: Save(3) with underline for whole but I need underline just for save and I dont want to have underline for (3). would you please help?

Use a span (or other HTML tag) to apply styles more specifically.

<div class="action btn-save">
  <span class="my-underline">{{'SaveTitle' | translate}}</span>
  <span>({{row.box.length}})</span>
</div>

.my-underline {
  text-decoration: underline;
}

You can accomplish what you need by defining a tag such as span and then using that attribute in the HTML like so by changing its properties:

css

span {
 text-decoration: underline; 
}

html

<div class="action btn-save"> <span>{{'SaveTitle' | translate}}</span>({{row.box.length}})
</div>

enclose the text you want to underline inside a span tag and desribe it to be underlined.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM