我希望将父DIV设置为完整100%屏幕高度的70%.我设置了以下CSS,但它似乎没有做任何事情:
body {
font-family: 'Noto Sans', sans-serif;
margin: 0 auto;
height: 100%;
width: 100%;
}
.header {
height: 70%;
}
Run Code Online (Sandbox Code Playgroud)
由于某种原因,它似乎没有工作,并且标题不是屏幕大小的70%.有什么建议?
我有一个菜单栏链接到我页面上的锚点.目前,页面中的内容在初始页面加载时使用CSS3进行动画淡化,但我希望在菜单栏中的某个锚链接被点击后淡入其中.我怎么做?
例如.然后按下关于.aboutinfo CSS动画被激活.
我有一个注册表单,它动态地检查数据库中的现有用户名和电子邮件地址.但是,它似乎不适用于FireFox或IE.虽然它在Safari和Chrome上很棒.这是代码:
<input type="text" name="username" id="username" placeholder="Username" class="registerinvitel" onKeyUp="resettooltip();" onFocusOut="check_register_exist('username');" autocomplete="off" />
Run Code Online (Sandbox Code Playgroud)
和JavaScript:
function check_register_exist(meth){
var cueajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
cueajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
cueajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
cueajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
// Create a function that will receive data sent from the …Run Code Online (Sandbox Code Playgroud)