html怎么在网页标题栏上添加图标

您所在的位置:网站首页 礼服类型名称加图片怎么弄 html怎么在网页标题栏上添加图标

html怎么在网页标题栏上添加图标

2024-07-12 04:58| 来源: 网络整理| 查看: 265

需求

像下图这样给网页标题栏加个图标 在这里插入图片描述

方法

需要先把图片格式转换为.ico类型 在这个网址在线转换很方便:https://www.easyicon.net/covert/ 在加一行来显示图标(注意,如果加入了没有效果,检查一下路径是否正确,文件名是否正确) 在网页标题左侧显示: 在收藏夹显示图标:

示例 MarioHome //在网页标题左侧显示图标 //在收藏夹显示图标 .search { position: relative; width: 78%; margin: 0px auto; padding-left: 3.4em; font-size: 14px;} .search:after{ clear:both;content:'.'; display:block;clear:both;height:0; visibility:hidden; overflow:hidden;} .search_t { float: left; width: 78%; height: 60px;margin-left: 0px; margin-top: 20%; padding-left: 20px; padding-right: 20px; font-size: 18px;/* border: 1px solid #cdcdcd; */border-top-left-radius: 15px; border-bottom-left-radius: 15px; border-top-right-radius: 15px; border-bottom-right-radius: 15px;} .search_b { float: right; width: 200px; height: 60px;margin-left: 0px;margin-top: 20%;padding-left: 0px; padding-right: 0px; font-size: 18px;/* border: 1px solid #cdcdcd; */border-top-left-radius: 15px; border-bottom-left-radius: 15px; border-top-right-radius: 15px; border-bottom-right-radius: 15px;} .background_{ background:url("./background.jpg") no-repeat; background-size: 100%;} 效果

在这里插入图片描述



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3