1.新建一个文件夹,比如Custom CSS,包含Custom.css和manifest.json两个文件
2.manifest.json的内容如下
{
"content_scripts": [ {
"css": ["Custom.css"],
"all_frames": true,
"matches": [ "http://*/*", "https://*/*" ]
} ],
"description": "Custom.css",
"name": "Custom CSS",
"version": "1.0",
"manifest_version": 2
}3.打开Chrome的扩展管理,选择打包扩展程序,扩展程序根目录选择Custom CSS文件夹,私有密匙文件不用管,然后选择打包扩展程序,生成Custom CSS.crx和Custom CSS.pem。
4.将Custom CSS.crx拖入扩展管理安装即可。
本文介绍如何创建一个Chrome浏览器扩展程序来定制网页样式。通过建立包含Custom.css和manifest.json的文件夹,设置manifest.json中content_scripts等字段,再进行扩展程序的打包及安装,实现对任意网站样式的个性化调整。
3470

被折叠的 条评论
为什么被折叠?



