safari

如何实现html5页面,自动提示添加到主屏幕

只愿长相守 提交于 2020-02-14 23:55:18
虽然没有能力开发Native App,但还是可以利用iOS中Safari浏览器的特性小小的折腾一下,做一个伪Web App满足下小小的虚荣心的。 既然是在iOS中的Safari折腾的,那么代码中利用到的也基本上都是Safari的私有属性。 添加图标到主屏幕是Web App的第一步: <link rel="apple-touch-icon-precomposed" sizes="57x57" href="icon-57.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="icon-72.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="icon-114.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="icon-144.png"> 添加图标到屏幕里的有两种属性值apple-touch-icon和apple-touch-icon-precomposed,区别就在于是否会应用iOS中自动给图标添加的那层高光。 由于iPhone以及iPad都有两种分辨率的设备存在,图标的尺寸就需要做4个:144×144(iPad Retina)、72

Facebook form app inside iframe loses cookies for Safari browsers in Windows platform

主宰稳场 提交于 2020-02-14 16:13:22
问题 I have a facebook app built using iframe. It works ok on most modern browsers except Safari on Windows platform. On Safari windows platform, the cookies seem to get lost as a user move from initial form page to 2nd page with questions. Here is the live link http://on.fb.me/1hCfgOX Can someone help me on how to fix this? 回答1: Ok, i found a fix for it which works perfectly. Checkout the following links: Safari 3rd party cookie iframe trick no longer working? Facebook Iframe App with multiple

css3动画2D、3D转换

亡梦爱人 提交于 2020-02-13 12:06:38
css3动画的2D、3D转换代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>css3动画</title> <style type="text/css"> div{width:100px;height:100px;background: rebeccapurple;color:#fff;} .div1{ /*translate:移动(x,y)*/ transform:translate(100px,100px); -webkit-transform: translate(100px,100px);/*safari,chrome*/ -ms-transform: translate(100px,100px);/*IE*/ -o-transform:translate(100px,100px);/*opera*/ -moz-transform: translate(100px,100px);/*firefox*/ } .div2{ /*rotate:旋转(旋转角度edg)*/ transform:rotate(100deg); -webkit-transform:rotate(100deg);/*safari,chrome*/ } .div3{ /*scale:缩放(宽,高)*/

爬虫使用代理-python

懵懂的女人 提交于 2020-02-10 11:27:10
import random userAgentList = [ "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1" "Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6", "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/19.77.34.5 Safari/537.1", "Mozilla/5.0 (X11; Linux

各种浏览器的userAgent收集

天大地大妈咪最大 提交于 2020-02-07 00:27:34
window.navigator.userAgent 1) Chrome Win7: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.163 Safari/535.1 2) Firefox Win7: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0 3) Safari Win7: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50 4) Opera Win7: Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.9.168 Version/11.50 5) IE Win7+ie9: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729;

各种UserAgent的列表

孤者浪人 提交于 2020-02-06 22:42:48
User Agent是浏览器用于 HTTP 请求的用户代理头的值。更换User Agent能更好的模拟出不同的系统和浏览器信息。 Android Name User Agent Nexus 7 (Tablet) Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19 Samsung Galaxy S3 (Handset) Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 Samsung Galaxy Tab (Tablet) Mozilla/5.0 (Linux; U; Android 2.2; en-gb; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Firefox Name User Agent Firefox

Reactjs app doesn't show image preview in safari

久未见 提交于 2020-02-06 08:05:06
问题 I am trying to make an app where a user can upload an image and send it off to an email, it's working fine on all browsers except Safari. For both mobile and web browsers, when I choose an image to upload nothing seems to be previewed nor is it even loaded (ready to be sent). Is there anything I can do to fix this? My code as it stands is really simple: const EnterDetailPage = props => { const [imageUrl, setImageUrl] = useState(""); const [imageFile, setImageFile] = useState(); const [upload,

CSS3学习

余生长醉 提交于 2020-02-06 02:32:03
1.CSS3边框 border-radius:创建圆角边框 border-radius:25px; -moz-border-radius:25px; /* 老的 Firefox */ box-shadow:边框阴影,方向为x,y,z -moz-box-shadow: 10px 10px 5px #888888; /* 老的 Firefox */ box-shadow: 10px 10px 5px #888888; border-image:边框图片,IE不支持 2.CSS3背景 background-size:规定背景图片的尺寸,宽、高 background:url(/i/bg_flower.gif); background-size:63px 100px; -moz-background-size:63px 100px; /* 老版本的 Firefox */ background-repeat:no-repeat; background-origin 属性规定背景图片的定位区域。 背景图片可以放置于 content-box、padding-box 或 border-box 区域。 background:url(bg_flower.gif); background-repeat:no-repeat; background-size:100% 100%; -webkit

input元素的23种type类型

非 Y 不嫁゛ 提交于 2020-02-04 09:51:31
随着HTML5的出现,input元素新增了多种类型,用以接受各种类型的用户输入。其中,button、checkbox、file、hidden、image、password、radio、reset、submit、text这10个是传统的输入控件,新增的有color、date、datetime、datetime-local、email、month、number、range、search、tel、time、url、week共13个 传统类型 text  定义单行的输入字段,用户可在其中输入文本 password  定义密码字段。该字段中的字符被掩码 file  定义输入字段和 "浏览"按钮,供文件上传 radio  定义单选按钮 checkbox  定义复选框 hidden  定义隐藏的输入字段 button  定义可点击按钮(多数情况下,用于通过JavaScript启动脚本) image  定义图像形式的提交按钮 reset  定义重置按钮。重置按钮会清除表单中的所有数据 submit  定义提交按钮。提交按钮会把表单数据发送到服务器 text type="text"表示一个文本输入框,它是默认的输入类型,是一个单行的控件,一般是一个带有内嵌框的矩形 password type="password"表示一个密码输入框,它与文本输入框几乎一模一样,功能上唯一的不同的字母输入后会被隐藏

Why is flex affecting font size on iOS?

五迷三道 提交于 2020-02-04 00:59:13
问题 I'm pretty shocked after confirming that font size is affected somehow while using flexbox on Safari iOS iOS Desktop Code a { font-size: 14px; } a + a { margin-left: 1em; } .flex { display: flex; } .float > a { float: left; } .float:after { content: ""; display: block; clear: both; } <div> <a href="#">hola</a> <a href="#">adios</a> <a href="#">hola</a> <a href="#">adios</a> <a href="#">hola</a> <a href="#">adios</a> <a href="#">hola</a> <a href="#">adios</a> </div> <div class="flex"> <a href=