Commit ae6c8799 authored by hj's avatar hj

更新提交

parent 2d469b1b
...@@ -35,12 +35,12 @@ class ChemicalsMsdsService ...@@ -35,12 +35,12 @@ class ChemicalsMsdsService
preg_match('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i',$msds_html, $bodyStyle); preg_match('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i',$msds_html, $bodyStyle);
$msds_html = preg_replace('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i', '@body@', $msds_html); $msds_html = preg_replace('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i', '@body@', $msds_html);
$bodyStyle['bodyStyle'] = "<style>body{ font-family: 'msyh'; font-size: 0.8rem; font-weight: bold; display: block;}.container { padding-right: 5px;padding-left: 5px;margin-right: auto;margin-left: auto;width: 98%;} " . $bodyStyle['bodyStyle'] = "<style>body{ font-family: 'msyh'; font-size: 0.8rem; font-weight: bold; display: block;}.container { padding-right: 5px;padding-left: 5px;margin-right: auto;margin-left: auto;width: 90%;} " .
$bodyStyle['bodyStyle']."</style><body><div class='container'>"; $bodyStyle['bodyStyle']."</style><body><div class='container'>";
// 格式化处理 // 格式化处理
$bodyStyle['bodyStyle'] = preg_replace('/\.sds-cn[\s]*?\{[\s]*?line-height: 1.5;[\s]*?\}/i', '.sds-cn{line-height: 2.5;}', $bodyStyle['bodyStyle']); $bodyStyle['bodyStyle'] = preg_replace('/\.sds-cn[\s]*?\{[\s]*?line-height: 1.5;[\s]*?\}/i', '.sds-cn{line-height: 2.5;}', $bodyStyle['bodyStyle']);
$bodyStyle['bodyStyle'] = preg_replace('/\.sds-cn[\s]*?dd.clearfix[\s]*?\{ margin-left: 20px;[\s]*?\}/i', '.sds-cn dd.clearfix { margin-left: 20px; width:80% }', $bodyStyle['bodyStyle']); $bodyStyle['bodyStyle'] = preg_replace('/\.sds-cn[\s]*?dd.clearfix[\s]*?\{ margin-left: 20px;[\s]*?\}/i', '.sds-cn dd.clearfix { width:80% }', $bodyStyle['bodyStyle']);
$bodyStyle['bodyStyle'] = preg_replace('/\.sds-cn[\s]*?\.list-line[\s]*?li:before[\s]*?\{ content: " —— " \}/i', '.sds-cn .list-line li:before { content: " -- " }', $bodyStyle['bodyStyle']); $bodyStyle['bodyStyle'] = preg_replace('/\.sds-cn[\s]*?\.list-line[\s]*?li:before[\s]*?\{ content: " —— " \}/i', '.sds-cn .list-line li:before { content: " -- " }', $bodyStyle['bodyStyle']);
//$msds_html = preg_replace('/11123/', $bodyStyle['bodyStyle'], $msds_html); //$msds_html = preg_replace('/11123/', $bodyStyle['bodyStyle'], $msds_html);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment