小编Gew*_*woo的帖子

为什么此导航栏上方有空格

我想制作一个固定的导航栏.但现在菜单上方有空间.我尝试了任何我知道的解决方法,但它没有用.我在整个代码中搜索了一些创建空间的东西,但我找不到它.

#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)

html css

6
推荐指数
2
解决办法
76
查看次数

我在这里犯了什么错误[在新行中写入文件]?

我想创建一个简单的函数,在新行上将两个单词写入文件.但是,如果我运行此代码,它只会将"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)

如何将两个短语写入文件?

python file

3
推荐指数
1
解决办法
67
查看次数

在c#中执行批处理命令

我想在c#代码中运行批处理命令.

我尝试了这个代码,但它只弹出cmd但我希望它弹出cmd并显示"Hello World".

Process.Start("cmd", "echo Hello World");
Run Code Online (Sandbox Code Playgroud)

是否有可能做到这一点?

.net c#

1
推荐指数
1
解决办法
214
查看次数

标签 统计

.net ×1

c# ×1

css ×1

file ×1

html ×1

python ×1