load static !DOCTYPE htmlhtml lang=enhead meta charset=UTF-8 title block Title endblock title link rel=stylesheet href= static cssbase_infocss block css endblock headbodydiv class=left
To make the options appear in a vertical column, you can add the following CSS code to the "base_info.css" file:
.lay-out {
display: flex;
flex-direction: column;
}
.nav-link {
display: block;
padding: 10px;
text-decoration: none;
color: #000;
}
.nav-link:hover {
background-color: #f2f2f2;
}
This CSS code sets the flex-direction property of the .lay-out class to column, which makes the child elements appear vertically. The .nav-link class styles the links as blocks and adds some padding and hover effects.
Make sure to link the "base_info.css" file correctly in your HTML template:
<link rel="stylesheet" href="{% static "css/base_info.css" %}">
With this CSS code, the options in the left navigation box will be displayed in a vertical column
原文地址: https://www.cveoy.top/t/topic/hBUw 著作权归作者所有。请勿转载和采集!