简单的HTML dom css选择器无法正常工作

in reference to http://simplehtmldom.sourceforge.net/

I have this code:

require_once('simple_html_dom.php');

$x = '<span style="font-family:symbol">&#174;</span>';
$dom = str_get_html($x);
$lis = $dom->find('[style=~font-family:symbol]');
print_r($lis);

Which tries to find tags whose style has the font-family:symbol in it using a css selector.

However this returns nothing.

What is wrong with my code?

查看全部
douxi3432
douxi3432
2014/04/09 16:32
  • css
  • dom
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复