小编Kay*_*yla的帖子

样式表格式固定和固定宽度列+ colspan

我有以下布局.

<style>
   table { width: 200px; white-space: nowrap; table-layout: fixed; }
   .a { width:10px; overflow: hidden; text-overflow: ellipsis }
   .b { width:190px; overflow: hidden; text-overflow: ellipsis }
</style>

<table border="1" style="">
    <tr>         
        <td colspan="2">Some content header goes in here</td>
    </tr>
    <tr>
        <td class="a">This cells has more content</td>
        <td class="b">Less content here</td>
    </tr>
</table>
Run Code Online (Sandbox Code Playgroud)

我试图设置一个固定的表格布局,并在每列上有一个固定的宽度,但是,因为我已经colspan在固定列之上,所以我无法设置宽度.我怎样才能做到这一点?

css html-table

9
推荐指数
1
解决办法
1万
查看次数

正则表达式只用一个">"替换所有前导">"

如何使表达式匹配并替换所有前导>只有一个>

我试过使用,^>(.*?)[^\W]+但似乎并不适用于所有情况.

一些可能的情况:

>> >> > some matching <string> goes in here >...
>   > >
>   > >\n
>
Run Code Online (Sandbox Code Playgroud)

应该是这样的

> some matching <string> goes in here >...
>
>
>
Run Code Online (Sandbox Code Playgroud)

javascript regex

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

标签 统计

css ×1

html-table ×1

javascript ×1

regex ×1