我的文档中有一个锚标记的全局规则:
a,a:hover {border-bottom: 1px solid #ccc;}
Run Code Online (Sandbox Code Playgroud)
但是边框在图像上看起来并不好看.我很好奇是否有办法删除包含仅使用纯CSS的图像的锚标签的边框?
我正在尝试编写一个脚本来改变页面的宽度,考虑用户的客户端宽度.它是这样的:
function adjustWidth() {
width = 0;
if (window.innerHeight) {
width = window.innerWidth;
} else if (document.documentElement && document.documentElement.clientHeight) {
width = document.documentElement.clientWidth;
} else if (document.body) {
width = document.body.clientWidth;
}
if (width < 1152) {
document.getElementsByTagName("body").style.width="950px";
}
if (width >= 1152) {
document.getElementsByTagName("body").style.width="1075px";
}
}
window.onresize = function() {
adjustWidth();
};
window.onload = function() {
adjustWidth();
};
Run Code Online (Sandbox Code Playgroud)
使用此脚本,我从Firebug收到错误:
document.getElementsByTagName("body").style is undefined
Run Code Online (Sandbox Code Playgroud)
现在我的问题是,我怎样才能获得身体的风格?因为在css表中定义了它的selector和width属性.
如果我们在函数内部创建一个静态变量,这个变量存在于函数的进一步使用中......据我所知,全局变量也是如此.现在使用静态变量有什么好处?
我已经安装mongodb使用homebrew.该mongo命令在终端中按预期运行,但是当我mongod在终端中运行时它返回:
mongod --help for help and startup options
2014-09-27T12:55:42.705+0330 [initandlisten] MongoDB starting : pid=3704 port=27017 dbpath=/data/db 64-bit host=Your-MacBook-Pro.local
2014-09-27T12:55:42.705+0330 [initandlisten]
2014-09-27T12:55:42.705+0330 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2014-09-27T12:55:42.705+0330 [initandlisten] db version v2.6.4
2014-09-27T12:55:42.705+0330 [initandlisten] git version: nogitversion
2014-09-27T12:55:42.705+0330 [initandlisten] build info: Darwin Your-MacBook-Pro.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
2014-09-27T12:55:42.705+0330 [initandlisten] allocator: tcmalloc …Run Code Online (Sandbox Code Playgroud)