我知道这是一个很常见的问题,有很多答案,但我的问题不同,我想接受以下所有格式的网址:
http://www.sample.com
https://www.sample.com
http://www.sample.com/xyz
www.sample.com
www.sample.com/xyz/#/xyz
sample.com
// & much more ...
Run Code Online (Sandbox Code Playgroud)
所以这里的想法是,我允许用户进入那里的网站和另一个用户可以点击已保存的网站并转到用户网站.因此,限制用户输入正确的URL并不是一个好主意,他们可以输入上述任何格式.这是我正在使用的正则表达式,但只检查URL是否从正确的协议开始:
^(ftp|http|https):\/\/[^ "]+$
Run Code Online (Sandbox Code Playgroud) 如下图所示,旁边的"+"图标是全屏按钮.
单击它时,它不会全屏显示.
我尝试了基本的jQuery:
$("#fullScreen-btn").css({height: 100%, width: 100%});
Run Code Online (Sandbox Code Playgroud)
这似乎不起作用.
我需要它像我们在浏览器上按F11一样工作,它必须在移动设备上全屏(不是谷歌地图应用程序)
有人可以帮我从这里出去吗 ?
iframe的内容在chrome中运行良好,但在firefox中运行不正常.我已禁用加载项,但我的iframe仍为空.我的网站和iframe都是https.
以下是代码:
<p><iframe class="display:inline-block;" frameborder="0" height="2622px" scrolling="no" src="https://www.emolument.com/start" width="100%"></iframe></p> Run Code Online (Sandbox Code Playgroud)
我正在将我制作的 Gif 转换为 CSS 动画。一切都在 Chrome、Firefox、Opera 上运行,但是当涉及到 Safari 时,它就起作用了。
当我最初加载页面时,图像会忽略翻译并位于下方,但是一旦我单击 Safari 选项卡并返回,页面就会更新并且图像具有由翻译提供的适当坐标。
有谁知道为什么会发生这种情况?
HTML:
<section>
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Globe.png" class="globe center" width="50%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Red.png" class="center redSpin" width="50%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Orange.png" class="center orangeSpin" width="50%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Yellow.png" class="center yellowSpin" width="50%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Green.png" class="center greenSpin" width="50%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Blue.png" class="center blueSpin" width="50%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Indigo.png" class="center indigoSpin" width="50%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Violet.png" class="center violetSpin" width="50%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/Continents.png" class="center continent" width="170%">
<img src="http://dev.colecampbell.design/CodePen/GayDay/img/GlobeMask.png" class="center knockOut" width="190%">
</section>
Run Code Online (Sandbox Code Playgroud)
CSS:
*{
margin: 0px;
padding: 0px;
}
body{
background-color:#333;
overflow: hidden;
}
.center{
position: …Run Code Online (Sandbox Code Playgroud) 我有一个 PDF 文件,其中附加了嵌入文档。
我无法从 Chrome 下载附件或查看 PDF 文件中嵌入的附件。
但是,如果我右键单击链接并使用“链接另存为”菜单来保存文件,我就可以下载附件。
我应该怎么办 ?
我想模仿Google的输入,它会根据您输入的语言自动更改输入的输入方向。
如何确定用户是以RTL还是LTR语言输入的?它必须跨浏览器工作。
我正在使用vmax的高度和宽度.
它在firefox和chrome中运行得非常好,并且响应迅速.
但在IE中,它无法正常工作.
我还可以在IE中使用vmax的替代品吗?
它应该响应?
谁能提出建议?
我有一个进度条,我想将它的样式与默认设置不同。
我尝试了一些东西,但没有按我预期的那样工作。
我想更改进度条的背景颜色和边框半径。
当我设置背景颜色时,它会从默认的蓝色变为绿色,而不是我设置的颜色。
<progress class="amount-progress" value="60500" max="120000">70 %</progress>
Run Code Online (Sandbox Code Playgroud)
你可以看到小提琴。
当我设置background-color颜色从蓝色变为绿色时,必须变为不同的蓝色。
我希望进度条具有平滑的边缘。
我确实设置了,border-radius但这也没有解决。
.amount-progress{
width: 80%;
margin-left: -11.5%;
height: 22px;
background-color: #0091EA;
Run Code Online (Sandbox Code Playgroud)
}
我希望创建一个文本输入,其中文本垂直填充整个输入字段。如下图所示:
这在 Firefox 和 Chrome 中一切正常。
在 Safari 中,我看到了这个问题:
似乎 line-height 没有正确应用于输入字段。有趣的是,它正确地应用于占位符。
我的代码:
网址:
<input type="text" placeholder="ABCD" value="ABCD">
Run Code Online (Sandbox Code Playgroud)
css:
input {
padding: 0;
margin: 0;
border: 0 none;
height: 140px;
line-height: 140px;
width: 600px;
font-size: 185px;
}
Run Code Online (Sandbox Code Playgroud)
您可以使用此链接测试我的代码:https : //jsfiddle.net/0xsven/16z9Lr6t/
这是一个错误还是我错过了什么?
编辑:我在 Mac OS 上使用 Safari 10.0.2
我在HTML表格的单元格中有多个元素。我希望某些元素与单元格的底部对齐,而另一些元素与顶部的单元格对齐。我在使元素与底部对齐方面遇到麻烦。我的桌子是:
<tr>
<td style="background-color: #007CE2">
<p id="t1_list">test<br>another<br>testing</p>
<input type="text" name="t1_input" id="t1_input">
<button>
Add
</button>
</td>
<td style="background-color: #E54040">
<p id="t2_list"></p>
<div class="value_input2">
<input type="text" name="t2_input" id="t2_input">
<button>
Add
</button>
</div>
</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
但是,div中的元素似乎想保持在单元格的中心,而不是保持在底部。到目前为止,我已经尝试了两种不同的CSS方法:
div.value_input {
position: absolute;
bottom: 0;
}
Run Code Online (Sandbox Code Playgroud)
这只是将div放到页面底部。和:
div.value_input2 {
display: table-cell;
vertical-align: bottom;
}
Run Code Online (Sandbox Code Playgroud)
哪个没有效果。
我在JSFiddle中有代码
我需要怎么做才能使输入框和按钮与单元格的底部对齐?
html ×8
css ×6
javascript ×3
jquery ×2
adobe ×1
alignment ×1
attachment ×1
firefox ×1
fullscreen ×1
google-maps ×1
html-table ×1
iframe ×1
pdf ×1
regex ×1
safari ×1
validation ×1