- 怎么判断iphone上有没有安装某一app呢?比如,如果安装了就跳转到那个app,如果没有安装,就跳转到web.
bundle ID:
Every iOS app requires an "App ID" to work. This is a string that is set up during development, usually in the form of com.your-company.app-name
. Please note that "App ID" and "Bundle ID" is generally used interchangeably.
display: 块级元素和inline元素
http://learnlayout.com/display.html
display is CSS's most important property for controlling layout. Every element has a default display value depending on what type of element it is. The default for most elements is usually block or inline. A block element is often called a block-level element. An inline element is always just called an inline element.
div is the standard block-level element. A block-level element starts on a new line and stretches out to the left and right as far as it can.
span is the standard inline element. An inline element can wrap some text inside a paragraph without disrupting the flow of that paragraph.
The a element is the most common inline element, since you use them for links.
none
二 重叠样式需要主要CSS样式解释
1、z-index 重叠顺序属性
2、position:relative和position:absolute设置对象属性为可定位(可重叠)
3、left right top bottom绝对定位具体位置设置
三 一个div在另一个div的底部
<div id="div1" style="border:1px solid red; width:500px; position:relative; height:500px;">
1111111
<div id="div2" style="border:1px solid green; width:300px; height:200px; position:absolute; bottom:0px;">2222222222
</div>
</div>
父元素position不能是static(默认值)
子元素potiosn需要是absolute
如何让父层DIV的滤镜效果不影响到子层DIV,就是说避免父层透明度的继承问题
- 在IE9和大多数浏览器,使用rgba就能避免父级影响后代的不透明度问题:
background: rgba(0,0,0,0.8);//前面3个0为红绿蓝颜色值,最后一个为不透明度
- 在父级中添加2个DIV,第一个设置opacity不透明度,第二个定位到第一个上面。因为2个DIV是同级,所以避免了opacity的影响。
四 两个class共用css:
.class1, .class2{
color: white;
}
五 margin
margin:10px 5px 15px 20px;
上外边距是 10px
右外边距是 5px
下外边距是 15px
左外边距是 20px
-
span float:right 不work:
要先变成块display:block;定义宽高
然后再右对齐文本
-
Radio
Personally, I'd use jQuery. Add an onclick to each "radio" (div with a class radio) to run a function which removes the "selected" class from all the divs and adds it to the one clicked.
Example at: http://jsfiddle.net/dGWJp/
- 字间距,行间距
word-spacing:50px; //字间距
line-height:50px; //行间距
- 加border边框
border-bottom: 1px solid #000;
border-width: 5px;
- 我是指 ion-email 这种图标,如果我要采用自定义的,怎么办?
.ion-email::before { content: url('../img/newEmailIcon.png');}
http://forum.ionicframework.com/t/add-custom-icons/559/10
http://ionicframework.com/blog/building-ionicons/
https://github.com/driftyco/ionicons#build-instructions
content: url('../images/selfProfile/icon-email.png');transform: scale(.5);
- ng-bind和{{}}的区别:
If you are not using ng-bind, instead something like this:
<div> Hello, {{user.name}}</div>
you might see the actual Hello, {{user.name}} for a second before user.name is resolved (before the data is loaded)
You could do something like this
<div> Hello, <span ng-bind="user.name"></span></div>
if that's an issue for you.
- How to center a button within a div?
button{
height:20px;
width:100px;
margin: -20px -50px;
position:relative;
top:50%;
left:50%;}
or
div{ text-align:center;}
- 跟PJ学的,自己设计css,代码可读性:
#selfInfo-email-logo::before{ font-family: Ionicons; font-style: normal; font-weight: 400; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; content: url('../images/selfProfile/icon-email.png'); transform: scale(.5);}
- except one class:
table:not(.dojoxGrid) {color:red;}
- span width:
span里面的字全部显示,不...的情况下,span的宽度限制:
width: 94%;display: inline-flex; - span 换行:
white-space: normal;