uni-app h5 modifies the title and icon of the browser navigation bar

1.title

        Modify in the pages.json file: "navigationBarTitleText": "uni-app"

2. Icon modification

2.1 Create a new index.html file in static as a template file, and put your icon image in the static folder

2.2 Add the following code to the index.html file (remember that the icon file is the picture you put in the static folder, here I take logo1.jpg as an example)

<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <link rel="icon" href="<%= BASE_URL %>static/logo1.png">
        <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    </head>
    <body>
        <noscript>
            <strong>Please enable JavaScript to continue.</strong>
        </noscript>
        <div id="app"></div>
    </body>
	<script type="text/javascript">
		
	</script>
</html>

2.3 At the same time, configure h5 under manifest.json

 2.4 Results

 

 

Guess you like

Origin blog.csdn.net/weixin_46872121/article/details/123082775