-1
我保存的HTML文件:如何将CSS放入字符串中?
<!DOCTYPE html>
<html>
<head>
<title>'Previous Test Run Breakdown'</title>
</head>
<body>
<h1> Breakdown of results by structure</h1>
#{my_str}
</body>
</html>
my_str
填补了HTML页面的内容。 my_str
的内部是我想要缩进的列表项。要做到这一点,我尝试添加一个CSS标签的底部缩进所有li
标签,如:
<!DOCTYPE html>
<html>
<head>
<title>'Previous Test Run Breakdown'</title>
</head>
<body>
<h1> Breakdown of results by structure</h1>
#{my_str}
</body>
</html>
li {
padding-left: 20px;
}
不幸的是,被显示在页面上,而不是向底部为li
项目的填充输出:
li {
padding-left: 20px;
}
将它包装在'