粗体 - 正常,斜体 - 正常工作但强调 - 没有工作?为什么?如何使用更改样式参数修复第一个示例。
# app/controllers/application_controller.rb:
class ApplicationController
include Pundit
# ...
private
def policy(record)
super
rescue Pundit::NotDefinedError
ApplicationPolicy.new pundit_user, record
end
end
答案 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>