Meteor - Angular 2 Flex布局移动问题

时间:2017-03-25 03:29:28

标签: angular meteor

我使用Meteor进行开发 - Angular2使用Angular 2的Flex布局

当屏幕尺寸小于520px时,我想要一个响应结果。

它可以很好地调整我的屏幕大小,但使用真实设备或Chrome设备工具栏它会吮吸..

以下是我的结果屏幕截图和代码

import requests
from bs4 import BeautifulSoup
try:
    import urllib.request as urllib2
except ImportError:
    import urllib2

#extracing links from main/master link    
r = requests.get("http://www.example.com")
soup = BeautifulSoup(r.content,"html.parser")
links = soup.find_all("a")
href_link={}
for link in links:
    if "https" in link.get("href"):
        key = link.get("href")
        value = link.text
        href_link[key]=value
        print(key)

#extract links from all the sublinks and so on from master link    
href_sublink={}
for k,v in href_link.items():
    r = requests.get(k)
    soup = BeautifulSoup(r.content,"html.parser")
    links = soup.find_all("a")
    for link in links:
        c = link.get("href");
        if c is not None and ("https" in c or "http" in c):
            key = link.get("href")
            value = link.text
            href_sublink[key]=value
            print("---",key)
print("------all the sublinks are below-----------")        

link_dict =  href_link.copy()
link_dict.update(href_sublink)

结果图片

Working with Screen Resizing

Not Working with Mobile mode

1 个答案:

答案 0 :(得分:0)

我自己解决了这个问题!!

您应该将此元标记添加到main.html(或index.html)以正确检测移动设备(而不仅仅是屏幕尺寸)

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Your Site Title</title>
</head>