小编ark*_*cha的帖子

无法获得"文本溢出:省略号"; 上班

我不能得到"文本溢出:省略号"; 工作...也许有人可以给那个人一些帮助:-)

小例子:http: //jsfiddle.net/qKS8p/2/

http标记:

<table class="" border="1">
    <tr><td colspan=3>…</td></tr>
    <tr class="">
        <td width="90"><span class="prose">column one</span></td>
        <td width="20"><span class="prose">column two</span></td>
        <td width="90"><span class="prose">column three</span></td>
    </tr>
    <tr><td colspan=3>…</td></tr>
</table>
Run Code Online (Sandbox Code Playgroud)

css样式规则:

.prose {
  overflow: hidden;
  white-space: nowrap;
  -o-text-overflow: ellipsis;
  -ms-text-overflow: ellipsis;
  text-overflow: ellipsis;
}
Run Code Online (Sandbox Code Playgroud)

由于td的宽度为20px,我希望"第二列"被切断.我也尝试了不同的divs,tds等变种,但我看不出任何变化.请注意,这在我检查的任何浏览器中都不起作用.所以我肯定会想念.

有数百万页的例子,浏览器差异以及和.但我不能让这个工作!根据当前信息,现在所有主流浏览器都支持简单的文本溢出属性.所以我正在寻找一个纯css解决方案(不是xul,而不是jquery插件),因为这应该工作.

谢谢,arkascha

css ellipsis css3

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

通过apache服务器内的服务器端过滤动态包含piwik代码

经过几个小时毫无结果的尝试后,我想通过一个简单的设置向大家请教一点帮助:

对于我使用apache2 http服务器运行的一堆Web应用程序和站点,我使用Piwik进行简单的统计概述.这很好.令我恼火的是,每增加一个应用程序/页面和每次更新/升级,我都必须小心手动维护piwik所需的javascript代码以包含在html标记中.

为了简化维护,我希望通过apache添加代码:我想使用一些apache模块:mod_filter,mod_env,mod_substitute和mod_include.我们的想法是通过过滤器将所有html文件与piwik代码一起注入.该过滤器使用替换来为</body>标记添加占位符.该占位符再次是由服务器端包含处理的sgml标记.该包含最终用piwik代码替换占位符,该代码以动态方式给出了所需的数字站点ID.

因此,配置新虚拟主机时剩下的就是在apache配置中指定两行:

  1. 包括存储在小文件中的过滤器设置
  2. 通过设置环境变量来指定数字piwik站点id

没有更多的摆弄应用程序内的模板文件!


我非常接近解决方案,缺少一步......

也许你们中的一些大师在这里发现了我所缺少的东西!


虚拟主机的(简单易用)配置:

<VirtualHost *:80>
ServerAdmin www@domain.here
ServerName some.domain.here

# include local piwik setup
SetEnv PIWIK_ID 5
Include /etc/apache2/vhosts.d/_internal.inc

DocumentRoot /some/path/here
<Directory  "/some/path/here">
    Options None
    AllowOverride none
    Order allow,deny  
    Allow from all    
</Directory>

</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

上面包含的(缩短的)配置文件:

# some internal resources 
<Directory "/srv/www/internal">
    Options None
    AllowOverride None
    Order deny,allow
    Allow from all 
</Directory>

# ----------
# internal requests to include the piwik tracking code at the bottom of every html …
Run Code Online (Sandbox Code Playgroud)

apache filter substitution matomo inclusion

5
推荐指数
0
解决办法
1079
查看次数

浏览器如何处理没有路径和域的cookie

我现在在Google上搜索了很多,找到了矛盾的答案。所以我的问题是:浏览器如何处理domain没有path属性且没有属性的HTTP cookie ?

例如,来自服务器的以下响应:

200 OK https://example.com/a/b (6047ms) 
Set-Cookie: x-my-cookie=1.0; Max-Age=86400000; Expires=Sun, 05-Jan-2020    08:30:25 GMT
Run Code Online (Sandbox Code Playgroud)

向发出请求时是否应包含cookie https://m.example.com/a/b

https://example.com/zzzz

还有https://example.com/a

还有https://example.com/a/b/c

还有https://example.com

cookies url http

5
推荐指数
2
解决办法
3577
查看次数

在 linux 上启动时启动脚本的最佳方法是什么

我想在系统启动时启动一个脚本并寻找最佳方式,我的方式是:

  • vi /etc/systemd/system/myscript.service

    [Service]
    Type=simple
    ExecStart=/usr/bin/myscript
    CPUSchedulingPolicy=rr
    CPUSchedulingPrioty=27
    [Install]
    WantedBy=multi-user.target graphical.target
    
    Run Code Online (Sandbox Code Playgroud)
  • systemctl daemon-reload; systemctl enable myscript; systemctl start rmyscript

它运行良好,但只是想知道是否有另一种更好的方法。

linux boot systemd

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

jquery过滤器选择器不匹配

我对一个我无法找到问题的简单问题感到沮丧:

我想通过查找由于不同标准而被标记为"已过滤"的任何单元格来过滤表格中的行.因此,最后一行过滤类型"选择"过滤的单元格以确定是否要过滤包含的行.

这是一个简单的例子:

HTML:

<table>   <tbody>
    <tr class="">
        <td class=""><span>1-1</span></td>
        <td class=""><span>1-2</span></td>
        <td class=""><span>1-3</span></td>      
    </tr>
    <tr class="">
        <td class=""><span>2-1</span></td>
        <td class="filtered"><span>2-2</span></td>
        <td class="filtered"><span>2-3</span></td>      
    </tr>
    <tr class="">
        <td class=""><span>3-1</span></td>
        <td class="filtered"><span>3-2</span></td>
        <td class=""><span>3-3</span></td>      
    </tr>   </tbody> </table>
Run Code Online (Sandbox Code Playgroud)

CSS:

table { margin: 20px; }
td { padding:4px; }
td span { background-color: silver; }
tr.filtered { display:none; }?
Run Code Online (Sandbox Code Playgroud)

JS/jQuery的:

$('table tbody tr').filter('td.filtered').addClass('filtered');
Run Code Online (Sandbox Code Playgroud)

我为此准备了一个小提琴手:http: //jsfiddle.net/dtsZX/3/

我希望第2行和第3行能够添加"过滤"类,从而被隐藏.然而,这不起作用.jquery命令有什么问题?

jquery filter selector

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

标签 统计

filter ×2

apache ×1

boot ×1

cookies ×1

css ×1

css3 ×1

ellipsis ×1

http ×1

inclusion ×1

jquery ×1

linux ×1

matomo ×1

selector ×1

substitution ×1

systemd ×1

url ×1