小编New*_*d3r的帖子

使用CSS旋转SVG路径

我有这个SVG:

* {
  background: #e1e1e1;
}
Run Code Online (Sandbox Code Playgroud)
<svg class="decor" height="100%" preserveaspectratio="none" version="1.1" viewbox="0 0 100 100" width="100%" xmlns="http://www.w3.org/2000/svg">
  <path d="M0 0 L100 100 L0 100" stroke-width="0"></path>
</svg>
Run Code Online (Sandbox Code Playgroud)

如何旋转180度?!

DEMO

css svg css3

15
推荐指数
2
解决办法
2万
查看次数

从php评论类中分离html

我发现这个类使用php和MySQL进行线程评论:

<?php
class Threaded_comments
{

public $parents  = array();
public $children = array();

/**
 * @param array $comments
 */ 
function __construct($comments)
{
    foreach ($comments as $comment)
    {
        if ($comment['parent_id'] === NULL)
        {
            $this->parents[$comment['id']][] = $comment;
        }
        else
        {
            $this->children[$comment['parent_id']][] = $comment;
        }
    }
}

/**
 * @param array $comment
 * @param int $depth
 */ 
private function format_comment($comment, $depth)
{
    for ($depth; $depth > 0; $depth--)
    {
        echo "\t";
    }

    echo $comment['text'];
    echo "\n";
}

/**
 * @param array $comment
 * …
Run Code Online (Sandbox Code Playgroud)

html php mysql

8
推荐指数
1
解决办法
124
查看次数

使用php删除部分网址

我有这个网址:

http://localhost/cms/uploads/files/1/images/hd-wallpaper-40.jpg
Run Code Online (Sandbox Code Playgroud)

并需要转换为:(在1之前删除所有网址)

1/images/hd-wallpaper-40.jpg
Run Code Online (Sandbox Code Playgroud)

编辑:

http://localhost/cms/uploads/files/ 是动态所以也许: http://localhost/uploads/files/

怎么能用php转换这个url?

php

0
推荐指数
1
解决办法
1136
查看次数

标签 统计

php ×2

css ×1

css3 ×1

html ×1

mysql ×1

svg ×1