美文网首页
学习怎么使用Markdown语言在简书写文章

学习怎么使用Markdown语言在简书写文章

作者: KMingMing | 来源:发表于2016-10-20 12:58 被阅读0次

    说一下对应规则:上面是用Markdown写的代码,下方对应的是效果。
    简书默认使用的是富文本书写,可以在设置中更改为Markdown模式。
    # 这是一级标题

    这是一级标题

    ## 这是二级标题

    这是二级标题

    ### 这是三级标题

    这是三级标题

    #### 这是四级标题

    这是四级标题

    ##### 这是五级标题

    这是五级标题

    ###### 这是六级标题

    这是六级标题
    ## 无序列表
    - 文本一
    - 文本二
    

    无序列表

    • 文本一
    • 文本二
    ## 有序列表
    1. 文本三
    2. [百度](http://www.baidu.com)
    3. 插入一张图片试试看吧
    ![](https://img.haomeiwen.com/i1512515/edbb0c7b646d50aa.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
    4. 下面引用一段:
    ### 注意:引用前面不能加别的文字。
    > 一盏灯, 一片昏黄; 一简书, 一杯淡茶。 守着那一份淡定, 品读属于自己的寂寞。 保持淡定, 才能欣赏到最美丽的风景! 保持淡定, 人生从此不再寂寞。
    5. 下面是粗体和斜体
    **粗体**   *斜体*
    

    有序列表

    1. 文本三
    2. 百度
    3. 插入一张图片试试看吧


    4. 下面引用一段:

    注意:引用前面不能加别的文字。

    一盏灯, 一片昏黄; 一简书, 一杯淡茶。 守着那一份淡定, 品读属于自己的寂寞。 保持淡定, 才能欣赏到最美丽的风景! 保持淡定, 人生从此不再寂寞。

    1. 下面是粗体和斜体
      粗体 斜体

    代码引用

    此处的代码不好放上来,说下规则:如果你的代码一行就能装下,只需要将代码放在两个`(后面暂时把他叫小点点符号)符号之间,也就是你需要打两个那个小点点符号,然后在他们之间写代码。这个符号就是在esc键的下面那个按钮,在英文状态下就可以打出来了。如果你的代码很多行就在代码的开头和结尾分别连续打3个小点点符号,在他们中间写代码就可以了。

    hello word

    - (void)creatMainShareView
    {
        UIView *MainV=[[UIView alloc]initWithFrame:CGRectMake(0, 0, DeviceWidth(), DeviceHight()-64)];
        MainV.backgroundColor=[UIColor clearColor];
        [self addSubview:MainV];
        
        UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenBaseShareView)];
        [MainV  addGestureRecognizer:tapGR];
        
        UIView *shareMainV=[[UIView alloc]initWithFrame:CGRectMake(0, 0, DeviceWidth(), BaseShareViewH)];
        shareMainV.backgroundColor=[UIColor clearColor];
        [self addSubview:shareMainV];
            
        self.shareTable=[[UITableView alloc]init];
        [shareMainV  addSubview:self.shareTable];
        self.shareTable.delegate = self;
        self.shareTable.dataSource = self;
        self.shareTable.rowHeight = BaseShareViewH * .5;
        self.shareTable.frame = CGRectMake(DeviceWidth()-BaseShareViewW, 0, BaseShareViewW, 0);
        self.shareTable.alpha = 0;
        self.shareTable.layer.borderWidth = 1;
        self.shareTable.layer.borderColor = [[UIColor colorWithRGBHex:0xF2F2F2] CGColor];
        self.isShow = NO;
    }
    
    ## 插入表格
    | Tables         | Are                 |Cool   |
    | ------------- |:-------------:   | -----:   |
    | col 3 is        | right-aligned  | $1600 |
    | col 2 is        | centered        | $12     |
    | zebra stripes | are neat       | $1       |
    

    插入表格

    Tables Are Cool
    col 3 is right-aligned $1600
    col 2 is centered $12
    zebra stripes are neat $1

    好啦!这就是基本的Markdown语法,相信已经可以满足写些日常小技术文章的需要了。

    相关文章

      网友评论

          本文标题:学习怎么使用Markdown语言在简书写文章

          本文链接:https://www.haomeiwen.com/subject/otrfuttx.html