我从3张图片构建了一个没有内容的网页,当它移动时,我只使用一个专门用于移动设备并具有引导整页背景的网页,它看起来非常好。 问题是,当我尝试制作一个超级链接,它有点像图像映射,但我认为它更容易,它没有在移动设备上显示的问题,我不知道为什么。 这里是代码,请帮忙整页背景引导和超链接
<!DOCTYPE html>
<html class="full" lang="en">
<!-- Make sure the <html> tag is set to the .full CSS class. Change the background image in the full.css file. -->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>The Big Picture - Start Bootstrap Template</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/the-big-picture.css" usemap="#entermap" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<img class="img-responsive myheader">
<img class="img-responsive myfooter">
<a href="waze://?ll=<35.1768493>,<32.9496625>&navigate=yes" title="" style="position: absolute; left: 13.47%; top: 91.75%; width: 73.47%; height: 6.49%; z-index: 2;"></a>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
/*!
* Start Bootstrap - The Big Picture HTML Template (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
body {
margin-top: 50px;
margin-bottom: 50px;
background: none;
}
.full {
background: url("DSC_5703final.jpg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
@media (max-width: 1000px){
.full {
background-size: cover;
top: 0;
left: 0;
/* Preserve aspet ratio */
min-width: 100%;
min-height: 100%; }
}
.myheader{
content:url("Untitled-1-01.png");
position: fixed;
z-index: 9999;
top: 0;
width: 100%;
height: auto;
}
.myfooter{
content:url("Untitled-1-02.png");
position: fixed;
bottom: 0;
margin: 0 auto;
overflow: hidden;
}
@media screen and (max-width: 480px){
.full{
content:url("bgad.jpg");
width: 100%;
background-size: contain;
}
.myfooter{
content:url("");
}
.myheader{
content:url("");
}
}
你在链接到Waze的底部reffering到薄带?你是说它在普通浏览器上显示,但不在移动浏览器中显示? – yosefrow
是的,它不会出现在手机上 – ssabin
这可能是由于你使用的百分比为高度 – yosefrow