我不能删除下划线

时间:2016-02-04 22:38:07

标签: html css styles underline

粗体 - 正常,斜体 - 正常工作但强调 - 没有工作?为什么?如何使用更改样式参数修复第一个示例。

# app/controllers/application_controller.rb:
class ApplicationController
  include Pundit

  # ...

  private

  def policy(record)
    super
  rescue Pundit::NotDefinedError
    ApplicationPolicy.new pundit_user, record
  end
end

1 个答案:

答案 0 :(得分:0)

尝试将vurgusuz更改为display: inline-block

<html>

<head>
  <meta charset="UTF-8">
  <style type="text/css">
    vurgulu {
      text-decoration: underline;
      font-weight: bold;
      font-style: italic;
      font-size: 40;
    }
    vurgusuz {
      text-decoration: none;
      font-weight: normal;
      font-style: normal;
      font-size: 40;
      display: inline-block;
    }
  </style>
</head>

<body>
  Why output different? why first ex. zalimi underline?
  <br>
  <vurgulu>Zulmü alkışlayamam,
    <vurgusuz>zalimi</vurgusuz>asla sevemem;</vurgulu>
  <br>
  <vurgulu>Zulmü alkışlayamam,</vurgulu>
  <vurgusuz>zalimi</vurgusuz>
  <vurgulu>asla sevemem;</vurgulu>
</body>

</html>