问题描述
大家好,我刚刚开始学习,听说最好将CSS保存在我做的另一张纸中。我不知道如何在CSS样式表class MovementForm(FlaskForm):
product = SelectField("Product",choices = [])
from_location = SelectField("From Location",choices = [])
to_location = SelectField("To Location",choices = [])
quantity = StringField("Quantity",validators=[Datarequired()])
add_movement = SubmitField("Add Movement")
中使此部分正常工作,而现在我却将其正确地工作了,只是想知道是否还有其他更好的方法,谢谢!网站预览https://imgur.com/iDE6WF2
<div style=max-width:90%>
解决方法
始终建议将所有样式保留在CSS文件中。您可以将class / id分配给div并在css文件中添加样式。
<div class='some_class'>
在CSS文件中(当然,您必须在html中调用此CSS)
.some_class
max-width:90%
注意:-您的班级名称或ID名称应该是唯一且有意义的,以便更好地理解,并且不像我仅以some_class
为例。