您好,欢迎访问一九零五行业门户网

在JS中怎么让图片居中悬浮

这次给大家带来在js中怎么让图片居中悬浮,在js中让图片居中悬浮的注意事项有哪些,下面就是实战案例,一起来看一下。
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=gb2312" /> <style type="text/css"> .logo {  width: 650px;  height: 383px;  position:fixed;  background: url(http://www.jb51.net/images/logo.gif) no-repeat;  margin:auto;  left:0;  right:0;  top:0;  bottom:0; } </style> <title>图片垂直居中不随滚动条滚动的js代码</title> </head> <body style="height:3000px"> <p class="logo"> </p> </body> </html>
相信看了本文案例你已经掌握了方法,更多精彩请关注其它相关文章!
推荐阅读:
angularjs实现猜数字小游戏
非常好用的扩展web表单js插件总结
以上就是在js中怎么让图片居中悬浮的详细内容。
其它类似信息

推荐信息