"app-plus": {  
                    "bounce": "none",  
                    "titleNView": {  
                        "type": "transparent",  
                        "buttons": [  
                            {  
                                "fontSrc": "/static/navbars.ttf",  
                                "text": "\ue657",  
                                "float":"left",  
                                "fontSize": "20",  
                                "background":"rgba(0,0,0,0)"  
                            },{  
                            "fontSrc": "/static/navbars.ttf",  
                            "text": "\ue71f",  
                            "redDot": false,  
                            "float":"right",  
                            "fontSize": "20",  
                            "background":"rgba(0,0,0,0)"  
                        }]  
                    }  
                }                                    - 发布:2021-08-26 10:31
 - 更新:2021-08-30 14:34
 - 阅读:743
 
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windiws10 ltsc
HBuilderX类型: 正式
HBuilderX版本号: 3.2.3
浏览器平台: Chrome
浏览器版本: 92.0.4515.159(正式版本)
项目创建方式: HBuilderX
示例代码:
                                    
                                    
                                         
                                
                                                                                                操作步骤:
                                    
                                                        "app-plus": {  
                    "bounce": "none",  
                    "titleNView": {  
                        "type": "transparent",  
                        "buttons": [  
                            {  
                                "fontSrc": "/static/navbars.ttf",  
                                "text": "\ue657",  
                                "float":"left",  
                                "fontSize": "20",  
                                "background":"rgba(0,0,0,0)"  
                            },{  
                            "fontSrc": "/static/navbars.ttf",  
                            "text": "\ue71f",  
                            "redDot": false,  
                            "float":"right",  
                            "fontSize": "20",  
                            "background":"rgba(0,0,0,0)"  
                        }]  
                    }  
                }
                                     
                                
                                                                                                                "app-plus": {  
                    "bounce": "none",  
                    "titleNView": {  
                        "type": "transparent",  
                        "buttons": [  
                            {  
                                "fontSrc": "/static/navbars.ttf",  
                                "text": "\ue657",  
                                "float":"left",  
                                "fontSize": "20",  
                                "background":"rgba(0,0,0,0)"  
                            },{  
                            "fontSrc": "/static/navbars.ttf",  
                            "text": "\ue71f",  
                            "redDot": false,  
                            "float":"right",  
                            "fontSize": "20",  
                            "background":"rgba(0,0,0,0)"  
                        }]  
                    }  
                }                                    预期结果:
                                    
                                    
                                        导航栏type为transparent时button为left的时候会居中。  
                                     
                                
                                                                                                导航栏type为transparent时button为left的时候会居中。
实际结果:
                                    
                                    
                                        button为lleft没有居中。
                                     
                                
                                                            button为lleft没有居中。
bug描述:
根据观察button为right的时候 是有 justify-content: center; 属性的。  
但是为left的时候,是没有。
需要添加在以下css添加
.uni-page-head-transparent .uni-page-head-btn{  
  justify-content: center;  
}