我在移动safari上使用textareas,当一个textarea聚焦时,视口似乎在文档下面添加了填充.在检查和选择区域时,它不会解析为元素,甚至是html节点.
textarea在屏幕上的位置或者它是否绝对位置似乎并不重要,填充在聚焦时始终存在.有时您需要向下滚动才能使其可见,但理想情况下,根本不可能使其可见.
我在下面添加了一个屏幕截图和代码示例.有一个100%宽度和高度的封面,用于显示文档的常规边界,而textarea绝对位于正文的底部.
码:
<html>
<head>
<meta name="viewport" content="user-scalable=no, width=device-width" />
<style>
html{
background-color: gray;
}
body{
width: 100%;
margin: 0px;
}
#cover{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
display: block;
background-color: green;
}
#textarea{
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
height: 100px;
display: block;
margin: 0px;
font-size: 18px;
}
</style>
</head>
<body>
<div id="cover">Cover</div>
<textarea id="textarea"></textarea>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我很感激人们的见解.谢谢.
我正在尝试编写一个使用AES加密而不是AJAX的Web应用程序来与Java后端进行交互.
我花了很长时间寻找和测试图书馆,但没有一个证明是富有成效的.
我有Java < - > PHP正常使用以下java代码:
public static String encrypt(String input, String key){
IvParameterSpec ips = new IvParameterSpec("sixteenbyteslong".getBytes());
try {
key = md5(key);
} catch (NoSuchAlgorithmException e1) {
e1.printStackTrace();
}
byte[] crypted = null;
try{
SecretKeySpec skey = new SecretKeySpec(key.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, skey, ips);
crypted = cipher.doFinal(input.getBytes());
}catch(Exception e){
System.out.println(e.toString());
}
return new String(Base64.encodeBase64(crypted));
}
public static String decrypt(String input, String key){
IvParameterSpec ips = new IvParameterSpec("sixteenbyteslong".getBytes());
try {
key = md5(key);
} catch (NoSuchAlgorithmException …Run Code Online (Sandbox Code Playgroud)