有没有办法让HTML5画布成为我正在制作的网页的背景,并将所有元素放在它上面.
所以它的行为就像<body>?
我尝试使用z-index并将元素放在顶部,但随后它们可以点击或聚焦.我需要它们仍然可以正常运行,但画布也可以在后台单击,而不是可点击的,其中有元素.
我有一个文本文件,其中有一些空行.意思是在它们上面没有任何东西的线条,只占用空间.
它看起来像这样:
The
quick
brown
fox jumped over
the
lazy dog
Run Code Online (Sandbox Code Playgroud)
我需要它看起来像这样:
The
quick
brown
fox jumped over
the
lazy dog
Run Code Online (Sandbox Code Playgroud)
如何删除这些空行并仅删除包含内容的行并将其写入新文件?
以下是我知道该怎么做:
$file = fopen('newFile.txt', 'w');
$lines = fopen('tagged.txt');
foreach($lines as $line){
/* check contents of $line. If it is nothing or just a \n then ignore it.
else, then write it using fwrite($file, $line."\n");*/
}
Run Code Online (Sandbox Code Playgroud)