iphone development

  • 怎么判断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:relativeposition: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,就是说避免父层透明度的继承问题
  1. 在IE9和大多数浏览器,使用rgba就能避免父级影响后代的不透明度问题:
background: rgba(0,0,0,0.8);//前面3个0为红绿蓝颜色值,最后一个为不透明度
  1. 在父级中添加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

Screen Shot 2016-11-22 at 1.28.57 PM.png

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;

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;
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 13,815评论 1 92
  • PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
    念念不忘的阅读 13,562评论 5 6
  • 你是否曾经有过这样的感觉呢— 对某种看似长远关系的依恋。 在这样的关系里,你会感到熟悉和安全。 甚至偶尔, 会错觉...
    多三岁阅读 201评论 0 0
  • 梦携冷雨拌沙尘, 叙一场离愁、错乱得那么真。 续珠的眼窝湿了的枕巾, 告诉你情是那么深, 他们是你放不下的人。 夏...
    姀月阅读 323评论 1 3
  • 我从小就发现我有一个秘密。 那就是我可以看见我眼睛里的数字。 小时候我并不以为然。 直到七岁那年的一天。 在那...
    得了吧君阅读 3,462评论 2 16