网站似乎缩小了铬

时间:2018-05-30 01:17:43

标签: html google-chrome

我一直在玩一个网站已经有一段时间了,看起来当我把它拉到Chrome上,在移动设备上,它完全坏了。

为了修复此错误,我制作了导航栏的最小副本,问题仍然存在。

我有下面的代码,如果有人可以帮助我,那就太棒了:)。

<!DOCTYPE html>

<html lang="en">
	<head>
			<!-- Heading -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1,width=device-width,initial-scale=1.0">
			<!-- Bootstrap -->
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" crossorigin="anonymous">
	</head>
  
	<body>
		<nav class="navbar navbar-toggleable-md navbar-inverse bg-inverse">
			<!-- Navbar toggle button -->
			<button class="navbar-toggler navbar-toggler-right" type="button" 
			data-toggle="collapse" data-target="#navbarSupportedContent" 
			aria-controls="navbarSupportedContent" aria-expanded="false" 
			aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			</button>

			<!-- Navbar logo -->
			<a class="navbar-brand" href="/#">
				<img class="img img-responsive" style="width:48px; height:48px;" alt="logo"
				     src="http://icons.iconarchive.com/icons/graphicloads/100-flat/256/home-icon.png" />
			</a>

			<!-- Some other navbar shit; mostly  -->
			<div class="collapse navbar-collapse" id="navbarSupportedContent">
				<ul class="navbar-nav mr-auto animated ">
					<li class="nav-item" id="home-navi">
						<a class="nav-link" href="/#"><i class="fa fa-home" aria-hidden="true"></i> Home </a>
					</li>
					<li class="nav-item" id="help-navi" >
						<a class="nav-link" id="help" href="/#"><i class="fa fa-question-circle" aria-hidden="true" ></i> Help </a>
					</li>
				</ul>
			</div>
        </nav>
  </body>
</html>

以下是出现问题的照片。 (两者均在开发者工具Samsung Galaxy S5上进行过测试)。

on chrome

on firefox

- 谢谢,山姆。

1 个答案:

答案 0 :(得分:1)

修正了它!

事实证明,元标记存在问题。

将此添加为元标记

import UIKit class SAV: UIViewController , UITableViewDataSource, UITableViewDelegate, HomeModelProtocol{ var feedItems: NSArray = NSArray() var selectedClient : ClientModel = ClientModel() @IBOutlet weak var SAVTableView: UITableView! let ClientTable = [ "Jean", "seb", "max", "jcp", "loutre" ,"Guillaume" , "Luc"] let DevisTable = [ 0.7, 7.7, 8.8, 3, 5, 10, 12] let ChantierTable = [ "Chantier 1", "Chantier 2", "Chantier 3", "Chantier 4", "Chantier 5","Chantier 6", ""] let AdresseTable = [ "7 rue mathis", "1 rue des Maris", "5 rue de la Gare", "9 rue des Perdrix", "12 rue des Faux","", ""] override func viewDidLoad() { super.viewDidLoad() self.SAVTableView.estimatedRowHeight = 40; self.SAVTableView.rowHeight = UITableViewAutomaticDimension; SAVTableView.delegate = self SAVTableView.dataSource = self let homeModel = HomeModel() homeModel.delegate = self homeModel.downloadItems() // Do any additional setup after loading the view. } func itemsDownloaded(items: NSArray) { feedItems = items self.SAVTableView.reloadData() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return feedItems.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let SAVCell = SAVTableView.dequeueReusableCell(withIdentifier: "chantiercell") as! SAVTableViewCell // Get the location to be shown let item: ClientModel = feedItems[indexPath.row] as! ClientModel // SAVCell.Clientlbl.text = "\(feedItems[indexPath.row])" SAVCell.Devislbl.text = " \(item.IDClient as Optional )" SAVCell.Chantierlbl.text = item.Mail return SAVCell } func alert(_ title: String, message: String) { let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) let ok = UIAlertAction(title: "Ok", style: UIAlertActionStyle.cancel, handler: nil) alert.addAction(ok) self.present(alert, animated: true, completion: nil) } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { self.view.endEditing(true) }

似乎要修复它。

- 希望这有帮助,Sam。