首页 > 解决方案 > css - 如何规范继承之类的表单

问题描述

<ul>
<li><a href="{{ route('dashboard') }}">Panel</a></li>  
<li><a href="{{ route('contact') }}">Contact</a></li>
<li><form style="display: inline;" method="POST" action="{{ route('logout') }}">
  <button type="submit">Logout</button>
 @csrf
</form></li>
</ul>

这是我的代码。但它似乎如下所示:

在此处输入图像描述

我该怎么做:

在此处输入图像描述

如果我使用buttonandform而不是a它不整洁。如果你帮助我,我会很高兴。

标签: htmlcss

解决方案


您可以使用边距顶部。例如 :

margin-top: 5px;


推荐阅读