Giter Site home page Giter Site logo

blog's Introduction

blog

博客,技术记录

md语法

一级标题

二级标题

三级标题

四级标题

五级标题
六级标题

二、编辑基本语法
1、字体格式强调 我们可以使用下面的方式给我们的文本添加强调的效果 强调 (示例:斜体)
强调 (示例:斜体)
加重强调 (示例:粗体)
加重强调 (示例:粗体)
特别强调 (示例:粗斜体)
特别强调 (示例:粗斜体)
2、代码
<hello world>
3、代码块高亮

@Override
protected void onDestroy() {
    EventBus.getDefault().unregister(this);
    super.onDestroy();
}

4、表格 (建议在表格前空一行,否则可能影响表格无法显示)

表头 表头 表头
单元格内容 单元格内容 单元格内容
单元格内容 单元格内容 单元格内容

5、其他引用 图片
图片名称
链接
链接名称
6、列表

  1. 项目1
  2. 项目2
  3. 项目3
    • 项目1 (一个号会显示为一个黑点,注意⚠️有空格,否则直接显示为项目1)
    • 项目2

7、换行(建议直接在前一行后面补两个空格) 直接回车不能换行,
可以在上一行文本后面补两个空格,
这样下一行的文本就换行了。 或者就是在两行文本直接加一个空行。 也能实现换行效果,不过这个行间距有点大。

8、引用

第一行引用文字
第二行引用文字

blog's People

Contributors

jun-pata avatar

Watchers

James Cloos avatar  avatar

blog's Issues

bind()、.live()、.delegate()和.on()之间的区别简介

.bind() 方法将事件类型和一个事件处理函数直接注册到了被选中的DOM元素中。
.click() 方法只是.bind() 方法的简写。

$( "#members li a" ).bind( "click", function( e ) {} );
$( "#members li a" ).click( function( e ) {} );

方法将与事件处理函数关联的选择器和事件信息一起附加到文档的根级元素(即document)

$( "#members li a" ).live( "click", function( e ) {} );

.delegate() 方法会将选择器和事件信息 ( "li a" & "click" ) 附加到你指定的元素上 ( "#members" )。

$( "#members" ).delegate( "li a", "click", function( e ) {} );

Jquery的 .bind() , .live() 和 .delegate() 方法只需要使用.on()方法一种方式来调用它们

nth-child()用法总结

基本用法

:nth-child(n) //第n个
:nth-last-child(n) //倒数第n个

:nth-child(odd) //奇数项
:nth-child(even) //偶数项

:first-child //第一个
:last-child //最后一个
:only-child //只有一个列表项时的样式

计算用法

:nth-child(an+b)
1、a,b可为正值也可为负值;
2、-b为负值及减法;
3、-a为负值表示,从b开始(包括b)往前匹配a的倍数;

例子:
nth-child(-3n+7){background: #00f;}
tim 20171208113335

组合用法

:first-child:last-child //等同于 :only-child

li:nth-child(n)~li // 第n个li后(包括n)的所有li

例子:
li:nth-child(4n)~li{background: #00f;}
tim 20171208115318

li:first-child:nth-last-child(4),
li:first-child:nth-last-child(4) ~ li {
/* 当列表正好包含四项时,命中所有列表项 */
}
li:first-child:nth-last-child(n+4),
li:first-child:nth-last-child(n+4) ~ li {
/* 当列表至少包含四项时,命中所有列表项 */
}

li:first-child:nth-last-child(-n+4),
li:first-child:nth-last-child(-n+4) ~ li {
/* 当列表最多包含四项时,命中所有列表项 */
}

li:first-child:nth-last-child(n+2):nth-last-child(-n+6),
li:first-child:nth-last-child(n+2):nth-last-child(-n+6) ~ li {
/* 当列表包含2~6项时,命中所有列表项 */
}

参考书籍:《css揭秘》

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.