我应该如何风格化这个:
<div class="alert alert-dark" role="alert">
<div class="media">
<img th:if="${categoria.icone}" th:src="@{/imagem/download/__${categoria.icone.id}__}" width="64px" height="64px" class="mr-3" th:alt="${categoria}">
<svg th:unless="${categoria.icone}" width="64px" height="64px" class="bd-placeholder-img mr-3" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 64x64">
<title>Placeholder</title>
<rect width="100%" height="100%" fill="#868e96"></rect>
<text x="50%" y="50%" fill="#dee2e6" dy=".3em">#</text>
</svg>
<div class="media-body">
<h5 th:each="t : ${categoria.nome}" th:if="${#strings.equals(#strings.substringBefore(t.idioma,','), #strings.replace(#locale,'_','-'))}" th:utext="${t.conteudo}"></h5>
</div>
</div>
</div>
在某种程度上,图像不会改变警报元素的高度,但它的边缘显示在警报区域之外。(标签img和svg永远不会同时显示,它们取决于th:if条件的结果)
尚方宝剑之说
相关分类