The tooltip in the input works with focus, however, when I enter the data and the input loses focus, the tooltip runs over the entered data. How to solve this problem, tell me or show.
.form-group { margin-bottom: 20px; position: relative; display: block; } .form-control { width: 100%; height: 80px; padding: 0 32px 2px; border: 1px solid #e5e5e5; font-size: 16px; display: block; border-radius: 3px; background-color: #ffffff; color: #505b6a; transition: all .3s ease; box-sizing: border-box; } .ui-input-placeholder { position: absolute; z-index: 5; top: 32px; left: 46px; color: #b0aaaa; font-size: 16px; pointer-events: none; transition: top 0.3s ease; } .ui-input-placeholder::before { content: '*'; position: absolute; top: -6px; left: -15px; color: #df4a4a; line-height: 1; font-size: 23px; z-index: 10; } .form-control { width: 100%; height: 80px; padding: 0 32px 2px; border: 1px solid #e5e5e5; font-size: 16px; display: block; border-radius: 3px; background-color: #ffffff; color: #505b6a; transition: all .3s ease; font-weight: normal; font-family: "Roboto-Light", sans-serif; } .form-control:focus { padding-top: 30px; } .form-control:focus+.ui-input-placeholder { top: 19px; } .required-field .form-control { padding-left: 45px; z-index: 5; position: relative; background-color: transparent; } .required-field .form-control:focus+.ui-input-placeholder::before { top: -5px; } <label class="form-group required-field"> <input type="text" class="form-control"> <span class="ui-input-placeholder">Π Π΅Π³ΠΈΠΎΠ½ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ</span> </label>