背景图片拉伸效果(转)
2014-12-30 16:32
253 查看
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css"> body { padding: 0; margin: 0; overflow-x: hidden; background: url(ss.jpg) center no-repeat; background-size: cover; } </style> </head> <body> <script src="Scripts/jquery-1.8.2.js"></script> <script type="text/javascript"> $(function () { function resizeBody() { $("body").height($(window).height() - 2).width($(window).width() - 2); } resizeBody(); $(window).resize(function () { resizeBody(); }); }); </script> </body> </html>
相关文章推荐
- 背景图片拉伸效果(css3支持)
- UIButton 设置背景图片 拉伸效果
- 背景图片的拉伸效果
- 用滤镜实现背景图片的拉伸效果代码
- 如何让背景图片实现拉伸效果,且无任何偏移(记录下,以后会用到)
- css3实现背景图片拉伸效果像桌面壁纸一样
- 网页背景图片拉伸效果
- body背景图片的拉伸效果
- 怎样实现表格背景图片的拉伸效果
- css 背景图片定位在菜单效果中的应用实例
- 背景图片随窗口拉伸
- 图片背景拉伸显示
- 纯js实现背景图片切换效果代码
- Button-background背景图片变换效果讲解
- table的背景图片拉伸
- JQuery实现开关灯效果以及图片的显示背景变暗
- css 背景图片随分辨率自动拉伸
- android拉伸图片做背景
- 设置 listview 背景图片效果
- QTextEdit 设置背景图片与拉伸背景图片