使用英雄图像或全屏任何东西时,我通常会看到带有以下css位的文本或图像:
.item {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
Run Code Online (Sandbox Code Playgroud)
有人可以向我解释这段代码实际上在做什么吗?
我尝试更改 Git 的本机代码编辑器,但没有成功。现在,每当我尝试恢复提交时,都会收到以下错误:
hint: Waiting for your editor to close the file... notepad++.exe -wl1: notepad++.exe: command not found
error: There was a problem with the editor 'notepad++.exe -wl1'.
Please supply the message using either -m or -F option.
Run Code Online (Sandbox Code Playgroud)
我想知道如何重置或删除我所做的尝试修改。
I'm building a multipage form and I have some unusual validation requirements. Here's what I'd like to do/what I have done so far.
What I Want to Do:
(1) As each form field is filled in, I want a function to run and check that the user-input has met certain conditions -- i.e. for first and last name, that there are no numbers and there is a space in between the names.
(2) Once each of the field are full …
我什至设置了一个 onclick 来获取输入的值,如果该值是数字,则发出警报。如果输入的值为空,我试图提醒它说“没有数字”,但是,似乎即使我的输入为空,该函数也会返回一条语句,说明“空”值确实是一个数字。
我已经设置了变量来立即解析输入的值,但这就是为什么我的代码总是返回“是一个数字”的原因,因为它在收集变量时自动设置为 1?
代码:
HTML:
<input type="text" id="numberTest" />
<button id="button">Click Me</button>
Run Code Online (Sandbox Code Playgroud)
JS:
var button = document.getElementById("button");
button.onclick = function()
{
var numberTest = parseInt(document.getElementById("numberTest").value);
if(numberTest == NaN || "" || null)
{
alert("No Number");
}
else
{
alert("This is a number!");
}
};
Run Code Online (Sandbox Code Playgroud) 我想知道如何用另一个功能禁用一个功能。我有一个要求额外课程作业的表格,但如果用户尚未完成任何额外作业,则会隐藏输入。我想设置一个故障保护装置,以防他们删除一组输入并改变主意。
我需要帮助的是编写故障安全函数来检查:如果函数 1 发生,则禁用它。
代码笔: http: //codepen.io/theodore_steiner/pen/ORzpQQ
function hideCourseWork() {
var otherEducationHistory = document.getElementById("otherEducationHistory");
otherEducationHistory.style.display = "none";
if (otherEducationHistory.style.display == "none") {
var noAdditionalCourseWork = document.getElementById("noAdditionalCourseWork");
var checkNo = document.getElementById("checkNo");
var undo = document.getElementById("undoNoAdditionalCourseWork");
noAdditionalCourseWork.style.top = "-48px";
checkNo.style.top = "-65px";
undo.style.top = "-65px";
undo.style.top = "-63px";
}
};Run Code Online (Sandbox Code Playgroud)
<div class="input-group" id="other-education">
<p class="subtitleDirection">Please list in chronological order, any additional cources beyond the degree(s) listed above, including any Ministry of Education Courses. If you have not completed any additional course work, …Run Code Online (Sandbox Code Playgroud)对于很多人来说这个问题很简单,但我仍在学习。我试图更好地在简单对象的活动和非活动状态之间切换。
我有一个方形 div:
<div id = "square"></div>
Run Code Online (Sandbox Code Playgroud)
使用以下CSS,onclick,使div扩展
#square
{
height: 50px;
width: 60px;
border: 1px solid red;
transition: height 2s ease;
}
#square:active
{
height: 100px;
}
Run Code Online (Sandbox Code Playgroud)
下面的 javascript 来设置点击事件:
var square = document.getElementById("square").addEventListener("click", function()
{
this.classList.toggle("active");
}, false);
Run Code Online (Sandbox Code Playgroud)
但当我点击时似乎什么也没有发生。我将 JS 包含在其中是因为我也是学习 JS 的新手,并且我正在努力习惯简单的逻辑原理。
这是小提琴:https://jsfiddle.net/theodore_steiner/fsk6y50k/4/
任何帮助都会很棒
使用Kentico 9
当您创建新页面并单击"保存"时,它会自动发布该页面并使其生效.是否可以创建一个自定义工作流程,在保存页面的同时,将其置于草稿/编辑模式以进行审批,然后再继续?
我知道Kentico内置了一个表单构建器以及一个自定义布局功能.是否可以导入具有自己特定的css规则集的表单?
例如,我有以下表格:表格
body
{
margin-left: 0;
margin-top: 0;
background-color: #F5F5F5;
}
.clearFix
{
clear: both;
}
p
{
font-size: 13px;
margin-top: 10px;
margin-bottom: 5px;
margin-left: 35px;
margin-top: 15px;
color: #696969;
float: left;
}
#lastName
{
margin-left: 300px;
}
.city
{
margin-left: 318px;
}
#province
{
margin-left: 294px;
}
#oID
{
margin-left: 294px;
}
.postalCode
{
width: 300px;
height: 25px;
margin-left: 35px;
}
#schoolName
{
margin-left: 285px;
}
#courseFee
{
margin-left: 268px;
}
#courseEndDate
{
margin-left: 258px;
}
.netIncome
{ …Run Code Online (Sandbox Code Playgroud) html ×4
javascript ×4
css ×3
forms ×2
kentico ×2
git ×1
git-revert ×1
if-statement ×1
layout ×1
parsing ×1
text-editor ×1
validation ×1
webpage ×1