Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to prevent Chrome browser from automatically adding orange border after activating input box by CSS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains how CSS forbids Chrome browsers to automatically add orange borders after activating the input box. The explanation in the article is simple and clear and easy to learn and understand. Please follow Xiaobian's train of thought to study and learn how CSS forbids Chrome browsers to activate input boxes and automatically add orange borders.

Chrome will add orange borders to all input boxes by default. Although it is not intended to make our site look more friendly, it has an impact on custom tricks. When the mouse clicks on the input box, in the googlechrome browser, the active input box is added with an orange border when the cursor moves over the input box, and the mouse cursor moves away from the input box and is obscured by the orange border. This google reader actively adds css colors to the output box, which is particularly effective. Here's a brief introduction to the scheme that forbids the active input box and orange trick in Google browser.

For example, to make a rounded input output box, if you do not do any work on the properties of the border focus, Chrome will default to add a square border, ignoring the edict that you set the border of input to none.

To fight poverty, we may prevent chrome from adding borders to the activated input box by:

1. Prevent the border from growing for all active output boxes (this door diameter is recommended)

*: focus {outline: none}

two。 Prevent the addition of borders to the activated input box, such as

.abc: focus {outline:none}

Description: ".abc" names the class class added to the input box object self-definition.

3. Also briefly customize the border when the output box is activated.

.abc: focus {outline:Blue Solid 4px;}

Description: ".abc" is a self-defined css name.

Thank you for your reading, the above is the content of "CSS how to prohibit Chrome browser from activating the input box to automatically add an orange frame". After the study of this article, I believe you have a deeper understanding of how CSS forbids Chrome browser to activate the input box and automatically add an orange frame after activating the input box. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report