l***@qq.com
l***@qq.com
  • 发布:2020-05-16 08:59
  • 更新:2020-05-16 08:59
  • 阅读:1217

hbuilderx 代码格式化之后变乱

分类:HBuilderX

笔者使用的开发工具是huilderx
笔者的代码格式如下

<html>  

<head>  
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />  
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>  
<script src="https://api.windy.com/assets/map-forecast/libBoot.js"></script>  
<style>  
#windy {  
  width: 100%;  
  height: 300px;  
}  
</style>  
</head>  

<body>  
<div id="windy"></div>  
<script src="script.js"></script>  
</body>  

</html>

但是按快捷键Ctrl+Shift+F 格式化之后,代码增加了很多tab

<html>  

  <head>  
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />  
    <script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>  
    <script src="https://api.windy.com/assets/map-forecast/libBoot.js"></script>  
    <style>  
      #windy {  
        width: 100%;  
        height: 300px;  
      }  
    </style>  
  </head>  

  <body>  
    <div id="windy"></div>  
    <script src="script.js"></script>  
  </body>  

</html>

hbuilder x格式化如何设置
hdea和body不缩进
meta,script,style 在head下不缩进
body下的直接子元素不缩进

2020-05-16 08:59 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复