Vì vậy, ví dụ như tôi có thể làm như thế này với nó:Parse CSS như Simple HTML DOM
$css = new simple_css();
foreach ($css->find_elements_with_property('margin') as $element) {
//do my stuff
if ($something) {
$elem->spacing = '1px';
}
}
$processed_css = $css->plaintext();
Something như thế chắc chắn sẽ có ích – GordonM