CSS / HTML:窗口中的中心文本没有滚动条(CSS/HTML: Center text in window without scroll bars)
我到处寻找在窗口中居中文本,我相信我找到了最好的解决方案(我相信......我还有其他的建议)。 但是,无论窗口有多大或多小,我都会在两侧看到这些恼人的滚动条。
你们可以看看这个代码/小提琴,让我知道为什么滚动条在那里以及如何删除它们?
<!DOCTYPE html> <html> <head> <link href='http://fonts.googleapis.com/css?family=Sigmar+One' rel='stylesheet' type='text/css'> <style> body { font-family: 'Asset', cursive; font-size: 100px; text-shadow: 4px 4px 4px #aaa; width: 100%; height: 100%; } div { position:absolute; height:100%; width:100%; display: table; } h1 { display: table-cell; vertical-align: middle; text-align:center; } </style> </head> <body> <div> <h1>HELLO</h1> </div> </body> </html>
I've looked everywhere to center text in a window and I believe I found the best solution (I believe... I'm up for other suggestions). However, I get these annoying scroll bars on both sides no matter how large or small the window is.
Can you guys take a look at this code/fiddle and let me know why the scroll bars are there and how to remove them?
<!DOCTYPE html> <html> <head> <link href='http://fonts.googleapis.com/css?family=Sigmar+One' rel='stylesheet' type='text/css'> <style> body { font-family: 'Asset', cursive; font-size: 100px; text-shadow: 4px 4px 4px #aaa; width: 100%; height: 100%; } div { position:absolute; height:100%; width:100%; display: table; } h1 { display: table-cell; vertical-align: middle; text-align:center; } </style> </head> <body> <div> <h1>HELLO</h1> </div> </body> </html>
原文:https://stackoverflow.com/questions/18164754
最满意答案
返回类型实际上是InputStream的InputStream还是子类?
是的,抽象类无法实例化,返回的对象将是
InputStream
子类的类型,您可以在此处从API中找到InputStream
的子类Is the return type is actually InputStream or subclass of InputStream?
Yes, abstract classes can't be instantiated and the returned object will be the type of the subclass of
InputStream
, you can find the subclasses of theInputStream
from the API here
相关问答
更多-
首先你需要了解的是STREAM 一个流可以被定义为一个数据序列。 InputStream用于从源读取数据,OutputStream用于将数据写入目标。 ****接下来是流的类型**** we have byte stream and character stream. classes we have in Input Stream and output stream 顾名思义, 简单来说,输入流用于输入数据,输出流用于输出数据 Java 字节流用于执行8位字节的输入和输出。 尽管有许多与字节流相关的 ...
-
gmpy源代码(gmpy source code)[2022-11-25]
我保持着gmpy和gmpy2。 @cartman和@DJV已经引导你到源代码,但我会添加一些注释。 mpz_probab_prime_p试验因子分析,然后进行Miller-Rabin检验的多次迭代。 Miller-Rabin测试不能证明一个数是素数,它非常擅长证明一个数是复合的。 如果你多次重复测试,那么这个数字很可能是最好的。 在已知的情况下, mpz_probab_prime_p在仅完成12到15次迭代时报告复合是素数。 更有趣的素性测试是BPSW测试。 没有已知的复合材料被报告为素数,但它推测它们存在 ... -
如果您的编译生成警告,但是从Java运行时没有看到警告,则警告将写入STDERR,并且您不会使用STDERR。 根据错误输出的数量,当缓冲区运行满时,make进程可能已停止。 如果Process是使用ProcessBuilder创建的,那么您应该调用redirectErrorStream(true)将错误输出与标准输出合并。 If your compilation generates warnings, but you don't see the warnings when run from Java, t ...
-
UIWebView源代码(UIWebView Source code)[2023-05-14]
您需要实现UIWebViewDelegate方法 - (void)webViewDidFinishLoad:(UIWebView *)webView并设置self.webView.delegate = self; 把你的代码NSString *yourHTMLSourceCodeString = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerHTML"]; 这个方法 You need imple ... -
Java从网站获取源代码(Java get Source code from Website)[2022-08-15]
在第二节课,你会打电话 try{ ClassA.Connect(); } catch(Exception e) { } 其中ClassA是定义public static void Connect()的类的名称。 请注意,按照惯例,方法名称应以小写字母开头,因此它应该是public static void connect()。 In the second class, you would call try{ ClassA.Connect(); } catch(Exception e) { ... -
那是因为ServletResponse / HttpServletResponse没有getInputStream() 。 您可能实际上想要使用来自HttpServletRequest getInputStream 。 request.getInputStream() That's because ServletResponse/HttpServletResponse doesn't have the getInputStream(). You might actually want to use get ...
-
返回类型实际上是InputStream的InputStream还是子类? 是的,抽象类无法实例化,返回的对象将是InputStream子类的类型,您可以在此处从API中找到InputStream的子类 Is the return type is actually InputStream or subclass of InputStream? Yes, abstract classes can't be instantiated and the returned object will be the type ...
-
你必须打电话: clientSocket.getOutputStream() clientSocket.getInputStream() 在DataOutput- / DataInputStream构造函数中。 You have to call: clientSocket.getOutputStream() clientSocket.getInputStream() inside your DataOutput-/DataInputStream constructors.
-
Magento源代码(Magento Source code)[2022-05-15]
看来你有点新鲜。 现在要更改滑块或菜单,您可以使用管理面板或源代码执行它们,具体取决于网站的编码方式。 由于您只有后端访问权限,因此目前无法获取源代码。 您可以请求您的站点管理员获取代码,一旦您拥有它,您可以转到root / app / design / frondend / [your-package] / [your-template] /template/page/html/header.phtml并查看如果你能看到菜单项。 如果没有,那么搜索和cms语法,你可以看到,如果你找到一个,复制名称并转到后 ... -
getInputStream()上的java.io.FileNotFoundException(java.io.FileNotFoundException on getInputStream())[2022-03-09]
连接响应代码为200 不,不是。 此代码中没有任何内容可以检查响应代码。 FileNotFoundException表示响应代码为404。 NB setDoOutput(true)将方法设置为POST。 你不需要自己设定, The connection response code is 200 No it isn't. There is nothing in this code that checks the response code. A FileNotFoundException means a re ...