天道酬勤,学无止境

mobile-website

移除手机屏幕中的图片链接(Remove image link in mobile screen)

问题 我的桌面网站主题上有一个可点击的图像,显​​示在移动屏幕上。 我设法使用以下代码删除了图像,但它留下了一个用户看不到的“幽灵”链接,但如果触摸它会将他们带到链接页面: 在页脚.tpl <div id="footer"> <div class="column"> <a href="http://mywebsite.com/delivery" id="test"></a> 在 stylesheet.css 中 #test { @media screen and (max-width: 480px) { image display: none; } background-image: url('../image/myimage.png'); background-repeat: no-repeat; position: absolute; margin-top: 10px; margin-left: 20px; width: 75px; height: 75px; 有什么办法也可以删除链接吗? 提前致谢。 回答1 给你的元素一个display:none; 关于媒体查询。 #test { display: block; background-image: url('../image/myimage.png'); background-repeat: no-repeat

2021-09-23 21:38:10    分类:技术分享    html   css   mobile-website

Remove image link in mobile screen

I have a clickable image on my desktop website theme which showed on mobile screens. I’ve managed to remove the image with the following code but it has left a ‘ghost’ link which users don’t see but if touched takes them to the linked page: In footer.tpl <div id="footer"> <div class="column"> <a href="http://mywebsite.com/delivery" id="test"></a> In stylesheet.css #test { @media screen and (max-width: 480px) { image display: none; } background-image: url('../image/myimage.png'); background-repeat: no-repeat; position: absolute; margin-top: 10px; margin-left: 20px; width: 75px; height: 75px; Is

2021-09-23 11:49:25    分类:问答    html   css   mobile-website

Html 禁用安卓深层链接(Html disable android deep link)

问题 有什么方法可以告诉网页链接(< a > 标签)不要深层链接到 android 应用程序并留在浏览器中。 我指的是可以在网站上完成的操作,而不是应用程序。 回答1 应用程序将在意图 url 模式与其清单中的深层链接模式匹配时启动。 我认为如果你知道什么是模式,你可以解决一些问题

2021-09-20 20:27:37    分类:技术分享    android   mobile-website   deep-linking

无需放大即可显示适合移动设备的网页(Showing mobile friendly web page without having to zoom in)

问题 我正在尝试使用下面的代码创建一个适合移动设备的网页。 当我在 HTC 上查看它时,我必须放大才能看到正确的尺寸。 如何让它在不放大的情况下正常显示? <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MobileSite._Default" %> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>My Mobile Site</title> </head> <body style="width: 480px"> <form id="form" runat="server"> <div> Test<br /> Test<br /> Test </div> </form> </body> </html> 回答1 我不确定 HTC 是否像 iPhone 一样支持视口元标记,但您可以尝试: <meta name=

2021-09-16 04:53:46    分类:技术分享    html   asp.net   mobile-website

jQuery toggle sibling on focus/blur

So I have this now and it works, but I wanted to know if there is an optimal way of writing this as I writing a mobile site and performance if a big thing. Think tool-tip that slides down (toggles) under the element, I also have about 30 tool tip divs on the page as this will be for multiple elements JS: $('.mobile-tool-tip').each(function() { $(this).hide(); $(this).prev().focus(function() { $(this).next().slideToggle('fast'); }); $(this).prev().blur(function() { $(this).next().slideToggle('fast'); }); }); HTML for mobile-tool-tip function <div data-role="fieldcontain"> <input type="text"

2021-09-09 05:00:08    分类:问答    jquery   mobile-website   jquery-mobile   performance

In mobile site Opera Mini select all the links of list items at once, any solution?

I'm making a mobile site for old mobile and testing on Nokia 5130 Xpress Music which has Opera Mini Browser. The problem is when I have links list on a web page opening in Opera Mini and I try to select one link of the list, but it select the all list items instead of single. Code of list <ul id="nav"> <li id="nav-1"><a href="#"><span>Nyheder</span></a></li> <li id="nav-2"><a href="#"><span>Kalender</span></a></li> <li id="nav-3"><a href="#"><span>Job</span></a></li> <li id="nav-4"><a href="#"><span>Kontakt</span></a></li> <li id="nav-5"><a href="#"><span>Fa Svar</span></a></li> </ul>

2021-09-08 19:23:43    分类:问答    html   css   opera   mobile-website   mobile-phones

How to obtain object from navigator.getUserMedia() in mobile web?

Trying to get a JavaScript reference/promise to a MediaStream returned from MediaDevices in HTML5 and WebRTC. JavaScript here is run on Chrome and Safari on iOS and Android. navigator.mediaDevices.getUserMedia(session, initRec , onErr); This throws TypeError: undefined is not an object (evaluating 'navigator.mediaDevices.getUserMedia') Fine, let's try it the slightly older way: navigator.getUserMedia(parms,initfunc,errfunc); This throws TypeError: navigator.getuserMedia is not a function. (In 'navigator.getUserMedia(parms,initfunc,errfunc)', 'navigator.getUserMedia' is undefined) Note: Both of

2021-09-05 22:24:30    分类:问答    javascript   google-chrome   audio   safari   mobile-website

How can I prevent Chrome from formatting a HTML5 format number

I need to create a form for a mobile website in which people can enter a number with a decimal mark like 5.3. In order to make it easier for the visitors to enter the numbers, I want to force the smartphone to display the on-screen keyboard with the characters the user is most likely to enter. It's possible to show the numbers on-screen keyboard by adding the HTML5 type="number" input type. Unfortunately Google Chrome then starts to validate the input and allows only intergers to be entered. So the user has a numbers on screen keyboard but cannot enter the number he needs to enter. How can I

2021-09-04 11:33:29    分类:问答    html   google-chrome   mobile-website   mobile-phones

Do i need to specify CSS for media=“handheld” and use of CSS media queries if I'm making a simple mobile site for iphone, android, blackberry only?

Do i need to specify CSS for media="handheld" and use of CSS media queries media="only screen and (max-device-width:xxxpx)" if I'm making a simple mobile site for iphone, android, blackberry only? Or media="all" or media="screen" would be enough? I'm only targeting Blackberry 4.6+, iphone and android.

2021-09-01 02:00:09    分类:问答    xhtml   css   mobile-safari   mobile-website

Webpage with wide iframe is not scrollable on an iPhone with viewport

I have a webpage aimed at mobile devices (e.g. iPhone & Android). This page has an <iframe> (that obviously includes another webpage to render). On the iPhone the page (and the iframe) render OK. I have set the <meta name="viewport" content="width=device-width" />, which should make it set the viewport width to about 320ish (or whatever safari uses now). However the content in my iframe is wider than 320ish pixels wide. This causes a problem because the iframe is truncated. The iPhone web browser only displays the left hand side of the iframe content. Since I have width=device-width, I am

2021-08-31 04:33:08    分类:问答    iphone   html   css   mobile-safari   mobile-website