把下载的CSS文件改为可读的形式-创新互联
刚下载的CSS文件不分段,难读,所以用c#程序把它换为更可读的形式, ![把下载的CSS文件改为可读的形式
把下载的CSS文件改为可读的形式](/upload/otherpic12/2131643.jpg)
分享标题:把下载的CSS文件改为可读的形式-创新互联
分享URL:http://ybzwz.com/article/djhgco.html
![把下载的CSS文件改为可读的形式
把下载的CSS文件改为可读的形式](/upload/otherpic12/2131643.jpg)
就是在 所有的 "{"之前 和 "}"之后 加回车和换行
程序如下
using System.IO;
private void button1_Click(object sender, EventArgs e)
{
//get path OpenFileDialog op = new OpenFileDialog();
op.RestoreDirectory= true;
op.Filter= "All|*.*|xlsx|*.xlsx";
if (op.ShowDialog() != DialogResult.OK)
return;
textBox1.Text= op.FileName;
}
private void button2_Click(object sender, EventArgs e)
{
string text = File.ReadAllText(textBox1.Text);
//text = text.Replace("{", "
{");
text= text.Replace("{", "
{");
text= text.Replace("}", "}
");
File.WriteAllText("test.txt", text);
}
分享标题:把下载的CSS文件改为可读的形式-创新互联
分享URL:http://ybzwz.com/article/djhgco.html