首页
关于
链接
留言
More
网站统计
更新主题
定制
订阅本站
网站地图
管理
Search
1
绿联云 NAS 中部署最新版思源笔记
133 阅读
2
对象存储:七牛云和又拍云怎么选
43 阅读
3
七牛云图床使用方法
42 阅读
4
aaPanel(宝塔国际版)怎么安装?
41 阅读
5
闲置的 OEC-Turbo 可以用来干什么
32 阅读
NAS实战
Python笔记
Linux系统
苹果系统
运维面板
CSS样式
网站知识
Photoshop
宽带连接
登录
Search
标签搜索
cloud
wiki
html
css
images
mode
wordpress
optimize
plugin
qiniu
ugreen
siyuan
chinanet
admin
domain
dns
aliyun
baidu
upyun
https
阿三 asan
累计撰写
14
篇文章
累计收到
9
条评论
首页
栏目
NAS实战
Python笔记
Linux系统
苹果系统
运维面板
CSS样式
网站知识
Photoshop
宽带连接
页面
关于
链接
留言
网站统计
更新主题
定制
订阅本站
网站地图
管理
搜索到
14
篇与
的结果
2025-08-17
七牛云图床使用方法
七牛云图床地址的配置需通过以下步骤完成:注册与创建空间访问七牛云官网(https://www.qiniu.com)注册账号,完成实名认证。进入对象存储服务(Kodo),新建存储空间并设置为公开访问。域名配置创建自定义域名(如img.yourdomain.com),在七牛云域名管理中绑定该域名。 在域名解析服务商(如腾讯云)添加CNAME记录,指向七牛云提供的CNAME地址。 图床插件配置以Typora + PicGo为例:在PicGo中设置:AccessKey和SecretKey:在七牛云账户的密钥管理中获取。 存储空间名:新建空间的名称。 存储区域:选择创建空间时选择的区域(如华东z0、华南z2)。 测试域名默认使用七牛提供的测试域名,但需注意30天有效期限制。注意事项域名需提前备案(境内域名),否则需选择境外区域。 访问控制必须设置为公开,否则图片无法访问。
2025年08月17日
42 阅读
1 评论
0 点赞
2025-08-13
Wordpress 网站免插件性能优化指南
注意:每一段代码上方都有功能注释,复制到主题 functions.php 文件,按需自取!//移除标头超链接 s.w.org remove_action('wp_head','wp_resource_hints',2); //移除文章和评论feed remove_action( 'wp_head', 'feed_links', 2 ); //移除分类等feed remove_action( 'wp_head', 'feed_links_extra', 3 ); // 隐藏WordPress登录失败时的错误提示信息 function no_wordpress_errors(){ return 'Something is Wrong.'; } add_filter( 'login_errors', 'no_wordpress_errors' ); //替换Gavatar头像地址 function get_ssl_avatar($avatar) { if (preg_match_all( '/(src|srcset)=["\']https?.*?\/avatar\/([^?]*)\?s=([\d]+)&([^"\']*)?["\']/i', $avatar, $matches ) > 0) { $url = 'https://cdn.sep.cc'; $size = $matches[3][0]; $vargs = array_pad(array(), count($matches[0]), array()); for ($i = 1; $i < count($matches); $i++) { for ($j = 0; $j < count($matches[$i]); $j++) { $tmp = strtolower($matches[$i][$j]); $vargs[$j][] = $tmp; if ($tmp == 'src') { $size = $matches[3][$j]; } } } $buffers = array(); foreach ($vargs as $varg) { $buffers[] = vsprintf( '%s="%s/avatar/%s?s=%s&%s"', array($varg[0], $url, $varg[1], $varg[2], $varg[3]) ); } return sprintf( '<img alt="avatar" %s class="avatar avatar-%s" height="%s" width="%s" />', implode(' ', $buffers), $size, $size, $size ); } else { return false; } } add_filter('get_avatar', 'get_ssl_avatar'); //WordPress查看站点新窗口打开 add_action( 'admin_bar_menu', 'customize_my_wp_admin_bar', 80 ); function customize_my_wp_admin_bar( $wp_admin_bar ) { //获取view-site 节点以便修改 $node = $wp_admin_bar->get_node('view-site'); //修改打开方式 $node->meta['target'] = '_blank'; //更新节点 $wp_admin_bar->add_node($node); } //禁用懒加载 add_filter('wp_lazy_loading_enabled', '__return_false'); /* 评论作者链接新窗口打开 */ function my_get_comment_author_link() { $url = get_comment_author_url( $comment_ID ); $author = get_comment_author( $comment_ID ); if ( empty( $url ) || 'http://' == $url ) return $author; else return "<a target='_blank' href='$url' rel='external nofollow' class='url'>$author</a>"; } add_filter('get_comment_author_link', 'my_get_comment_author_link'); //禁止后台谷歌字体 function coolwp_remove_open_sans_from_wp_core() { wp_deregister_style( 'open-sans' ); wp_register_style( 'open-sans', false ); wp_enqueue_style('open-sans',''); } add_action( 'init', 'coolwp_remove_open_sans_from_wp_core' ); //文章内链接新窗口打开 function autoblank($text) { $return = str_replace('<a', '<a target="_blank"', $text); return $return; } add_filter('the_content', 'autoblank'); // 设置图片的默认显示方式 add_action( 'after_setup_theme', 'default_attachment_display_settings' ); function default_attachment_display_settings() { update_option( 'image_default_align', 'center' ); //居中显示 update_option( 'image_default_link_type', ' file ' ); //连接到媒体文件本身 update_option( 'image_default_size', 'full' ); //完整尺寸 } // 移除 WordPress 加载的JS和CSS链接中的版本号 function wpdaxue_remove_cssjs_ver( $src ) { if( strpos( $src, 'ver=' ) ) $src = remove_query_arg( 'ver', $src ); return $src; } add_filter( 'style_loader_src', 'wpdaxue_remove_cssjs_ver', 999 ); add_filter( 'script_loader_src', 'wpdaxue_remove_cssjs_ver', 999 ); // 给WordPress分类目录链接删除斜杠 function mx_untrailingslashit($string, $type_of_url) { if ( $type_of_url != 'page' ) $string = untrailingslashit($string); return rtrim( $string, '/\\' ); } add_filter('user_untrailingslashit', 'mx_untrailingslashit', 10, 2); //屏蔽站点管理员邮箱定期验证功能 add_filter( 'admin_email_check_interval', '__return_false'); // Disable auto-embeds for WordPress >= v3.5 remove_filter( 'the_content', array( $GLOBALS['wp_embed'], 'autoembed' ), 8 ); // 移除头部 wp-json 标签和 HTTP header 中的 link remove_action('wp_head', 'rest_output_link_wp_head', 10 ); remove_action('template_redirect', 'rest_output_link_header', 11 ); // Disable XML-RPC functionality add_filter('xmlrpc_enabled', '__return_false'); //移除后台界面右上角的帮助和显示 add_action('in_admin_header', function(){ global $current_screen; $current_screen->remove_help_tabs(); }); add_action('in_admin_header', function(){ add_filter('screen_options_show_screen', '__return_false'); add_filter('hidden_columns', '__return_empty_array'); }); //移除页面头部的版本和服务发现相关代码 remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0); //彻底关闭 pingback add_filter('xmlrpc_methods',function($methods){ $methods['pingback.ping'] = '__return_false'; $methods['pingback.extensions.getPingbacks'] = '__return_false'; return $methods; }); //禁用 pingbacks, enclosures, trackbacks remove_action( 'do_pings', 'do_all_pings', 10 ); //去掉 _encloseme 和 do_ping 操作。 remove_action( 'publish_post','_publish_post_hook',5 ); //移除后台隐私相关的页面 add_action('admin_menu', function(){ remove_submenu_page('options-general.php', 'options-privacy.php'); remove_submenu_page('tools.php', 'export-personal-data.php'); remove_submenu_page('tools.php', 'erase-personal-data.php'); }, 11); //WordPress 彻底移除后台“隐私”设置功能 add_filter( 'map_meta_cap', 'ds_disable_core_privacy_tools', 10, 2 ); remove_action( 'init', 'wp_schedule_delete_old_privacy_export_files' ); remove_action( 'wp_privacy_delete_old_export_files', 'wp_privacy_delete_old_export_files' ); function ds_disable_core_privacy_tools( $caps, $cap ) { switch ( $cap ) { case 'export_others_personal_data': case 'erase_others_personal_data': case 'manage_privacy_options': $caps[] = 'do_not_allow'; break; } return $caps; } //后台提速 remove_action('admin_init', '_maybe_update_core'); remove_action('admin_init', '_maybe_update_plugins'); remove_action('admin_init', '_maybe_update_themes'); remove_action('init', 'wp_schedule_update_checks'); wp_clear_scheduled_hook('wp_version_check'); wp_clear_scheduled_hook('wp_update_plugins'); wp_clear_scheduled_hook('wp_update_themes'); //RSS feed更新频率 add_filter( 'rss_update_period', function() {return 'weekly';} ); add_filter( 'rss_update_frequency', function() {return '2';} ); //隐藏feed 版本号 function ludou_remove_wp_version() { return ''; } add_filter('the_generator', 'ludou_remove_wp_version');
2025年08月13日
15 阅读
0 评论
0 点赞
2025-08-12
em 和 rem 的区别和用法
在 CSS 中,em和rem都是相对长度单位,用于创建响应式布局,但它们的参考基准和使用场景有所不同:定义与基准em:相对于父元素的字体大小进行计算,如果父元素字体大小为 16px,那么 1em = 16px具有继承性,嵌套层级会影响最终计算结果rem:相对于根元素 (html) 的字体大小进行计算,"rem" 中的 "r" 代表 "root"(根)如果 html 元素字体大小为 16px,那么 1rem = 16px,不受父元素或嵌套层级影响,只与根元素相关使用示例/* 根元素设置 */ html { font-size: 16px; /* 浏览器默认通常是16px */ } .parent { font-size: 18px; } .child-em { font-size: 1em; /* 相对于.parent的18px,即18px */ width: 10em; /* 18px × 10 = 180px */ } .child-rem { font-size: 1rem; /* 相对于html的16px,即16px */ width: 10rem; /* 16px × 10 = 160px */ }嵌套场景差异<div class="grandparent"> <div class="parent"> <div class="child"></div> </div> </div>html { font-size: 16px; } .grandparent { font-size: 1.25em; } /* 20px (16×1.25) */ .parent { font-size: 1.25em; } /* 25px (20×1.25) */ .child-em { font-size: 1.25em; } /* 31.25px (25×1.25) - 嵌套放大 */ .child-rem { font-size: 1.25rem; } /* 20px (16×1.25) - 始终基于根元素 */适用场景总结!em 适合组件内部的相对尺寸(如按钮内的图标与文字比例),需要根据父元素大小成比例变化的元素,字体图标大小与文本保持一致rem 适合整体布局的尺寸控制(如容器宽度、间距),需要保持一致比例的 UI 元素,响应式设计中,通过媒体查询改变根字体大小实现整体缩放
2025年08月12日
14 阅读
0 评论
0 点赞
2025-08-07
html 的 css 样式中 span 和 div 的区别
即使是ai时代,百度的搜索依然具有价值,今天重新了解两个元素,做个笔记。以下内容来源于百度ai搜索,并非阿三自行总结,请自行判断内容真伪,仅供参考。另外,这个Joe主题虽然整体已经很高级,但是依然有需要完善的地方...SPAN和DIV的核心区别,体现在元素类型和布局特性SPAN是行内元素,用于文本片段修饰;DIV是块级元素,用于构建页面布局区块。{message type="warning" content="元素类型差异"/}SPAN:行内元素(inline),仅包裹文本或内联内容,不强制换行。DIV:块级元素(block-level),独占父容器宽度,前后自动换行。显示特性对比布局表现DIV默认纵向排列,形成独立区块(如头部、侧边栏)。SPAN横向连续显示,直到容器宽度不足时换行。默认样式DIV无预设样式,但自带换行特性。SPAN默认仅包裹内容,需配合CSS实现样式变化。使用场景划分DIV适用场景页面结构划分(头部/主体/页脚)。JavaScript操作的目标容器。需要设置宽高、边距等布局属性的场景。SPAN适用场景文本局部样式调整(如高亮、颜色修改)。动态内容操作(配合JavaScript/Vue/React)。构建导航栏标签等横向排列元素。
2025年08月07日
30 阅读
1 评论
1 点赞
1
2