小编Jig*_*hal的帖子

在文本框中键入最后一个数字时,第一个数字会进入

当我输入最后一个数字时,第一个数字进入text-box(它消失)里面,它增加了一个额外的空格。

在此处输入图片说明

在此处输入图片说明

在我点击外部后,text-box它看起来不错,这是我在输入最后一个字符时需要的。 在此处输入图片说明

  #number_text {
        padding-left: 9px;
        letter-spacing: 31px;
        border: 0;
        background-image: linear-gradient(to right, #e1e1e1 70%, rgba(255, 255, 255, 0) 0%);
        background-position: left bottom;
        background-size: 38px 1px;
        background-repeat: repeat-x;
        width: 220px;
        box-sizing: border-box;
        outline:none;
    }
Run Code Online (Sandbox Code Playgroud)
<input type="text" id="number_text" maxlength="6"  pattern="\d{6}" value="1234" >
Run Code Online (Sandbox Code Playgroud)

帮助我摆脱这个问题。谢谢

html javascript css jquery

15
推荐指数
1
解决办法
528
查看次数

如何避免 Chrome 在自动填充输入上隐藏背景图像和颜色

Chrome浏览器自动填充去除的效果background-color,并background-imageUsernamePassword输入字段。

自动完成前

在此处输入图片说明

自动完成后

在此处输入图片说明

但是Chrome 浏览器自动完成功能隐藏了我的输入图标,并且还更改了我的background-color. 所以我需要我的图标保持原样。

是否可以阻止Chrome 浏览器更改字段的背景颜色并隐藏图像?

.form-section .form-control {
	border-radius: 4px;
	background-color: #f7f8fa;
	border: none;
	padding-left: 62px;
	height: 51px;
	font-size: 16px;
	background-repeat: no-repeat;
	background-position: left 17px center;
}

.form-section .form-control:focus {
	-webkit-box-shadow: none;
	box-shadow: none;
}

.form-section .form-group {
	margin-bottom: 21px;
}

.form-section .form-control[type="email"] {
	background-image: url('https://i.stack.imgur.com/xhx3w.png');
}

.form-section .form-control[type="password"] {
	background-image: url('https://i.stack.imgur.com/910l0.png');
}

.form-btn {
  padding:10px;
    background-color: #65a3fe;
    border: none;
    color: #ffffff; …
Run Code Online (Sandbox Code Playgroud)

html javascript css google-chrome

13
推荐指数
1
解决办法
1690
查看次数

如何在相应的滚动上获得虚线 svg 动画?

在此处输入图片说明

每当我在虚线 svg 上应用滚动动画时,它就会转换成一条没有虚线的简单线条。

我想要当前正在运行的相同动画,但行将如下例dashed-line所示Svg Before animation

// Get the id of the <path> element and the length of <path>
var triangle = document.getElementById("dashed-path");
var length = triangle.getTotalLength();

// The start position of the drawing
triangle.style.strokeDasharray = length;

// Hide the triangle by offsetting dash. Remove this line to show the triangle before scroll draw
triangle.style.strokeDashoffset = length;

// Find scroll percentage on scroll (using cross-browser properties), and offset dash same amount as percentage scrolled
window.addEventListener("scroll", myFunction); …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery animation

2
推荐指数
1
解决办法
612
查看次数

如何用CSS设置形状?

是否可以用CSS将背景设置为相同的形状?

带有 css 的预期图像

在此输入图像描述

.cover {
    margin: 0;
    height: 70vh;
    width: 60vw;
    background-color: #073faa;
    border-radius: 0px 30px 30px 0px;
    transform-origin: bottom left;
  -ms-transform: skew(-30deg, 0deg);
  -webkit-transform: skew(-30deg, 0deg);
  transform: skew(-30deg, 0deg);
  border-radius:0px 10px 10px 0px
}
Run Code Online (Sandbox Code Playgroud)
<div class="cover"></div>
Run Code Online (Sandbox Code Playgroud)

html css

0
推荐指数
1
解决办法
159
查看次数

标签 统计

css ×4

html ×4

javascript ×3

jquery ×2

animation ×1

google-chrome ×1