我有一个我正在使用的按钮类,它会覆盖我的默认button或input type="button"元素的渐变.以下是默认代码:
input[type="button"], input[type="submit"], input[type="reset"], button {
background:#05ABE0;
background:linear-gradient(to bottom, #87E0FD 0%, #53CBF1 25%, #05ABE0 50%);
background:-moz-linear-gradient(top, #87E0FD 0%, #53CBF1 25%, #05ABE0 50%);
background:-ms-linear-gradient(top, #87E0FD 0%, #53CBF1 25%, #05ABE0 50%);
background:-o-linear-gradient(top, #87E0FD 0%, #53CBF1 25%, #05ABE0 50%);
background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #87E0FD), color-stop(25%, #53CBF1), color-stop(50%, #05ABE0));
background:-webkit-linear-gradient(top, #87E0FD 0%, #53CBF1 25%, #05ABE0 50%);
border:solid 2px #0076A3;
border-radius:0.3em;
-moz-border-radius:0.3em;
-o-border-radius:0.3em;
-webkit-border-radius:0.3em;
font-size:1em;
padding:0.4em;
display:inline-block;
margin-right:5px;
margin-left:5px;
font-family:Helvetica Neue, Helvetica, Arial, sans-serif;
color:white;
vertical-align:middle;
text-shadow:rgba(0, 0, …Run Code Online (Sandbox Code Playgroud) 我见过的所有 PHP 缩小函数都处理过物理 JavaScript、HTML、CSS 文件。我想要一个函数,当给出这样的东西时:
$code = "<html>
<body>";
Run Code Online (Sandbox Code Playgroud)
将它缩小到一行。我不是在寻找像YUI Compressor这样的东西,因为它处理服务器上的文件。我只是想要一个函数来缩小传递给它的字符串。这在任何地方都存在吗?