我想制作一个固定的导航栏.但现在菜单上方有空间.我尝试了任何我知道的解决方法,但它没有用.我在整个代码中搜索了一些创建空间的东西,但我找不到它.
#nav {
position: fixed;
text-align: center;
font-size: 22px;
background-color: #222222;
margin: 0 auto;
width: 100%;
}
#nav ul li a {
color: #ccc;
display: block;
padding: 10px;
text-decoration: none;
}
#nav ul {
list-style-type: none;
padding: 0;
margin: 0;
position: relative;
}
#nav ul li {
display: inline-block;
}
#nav ul li:hover {
background: #333333;
}
#nav ul li a:hover {
text-shadow: 3px 2px 3px #333333;
text-decoration: none;
position: relative;
bottom: 5px;
color: #fdde00;
}
html,
body {
height: …Run Code Online (Sandbox Code Playgroud)我想创建一个简单的函数,在新行上将两个单词写入文件.但是,如果我运行此代码,它只会将"tist - tost"写入文件.
码:
def write_words(word1, word2):
w = open("output.txt", "w")
w.write(word1 + " - " + word2 + '\n')
w.close()
write_words("test", "tast")
write_words("tist", "tost")
Run Code Online (Sandbox Code Playgroud)
输出:
tist - tost
Run Code Online (Sandbox Code Playgroud)
如何将两个短语写入文件?
我想在c#代码中运行批处理命令.
我尝试了这个代码,但它只弹出cmd但我希望它弹出cmd并显示"Hello World".
Process.Start("cmd", "echo Hello World");
Run Code Online (Sandbox Code Playgroud)
是否有可能做到这一点?