第一种方法(直接添加样式) input{ outline: none; } textarea{ outline: none; } 第二种方法(控制聚焦时不出现边框) input:focus{ outline: none; } textarea:focus{ outline: none; }