我想禁用我的网页源代码并检查元素栏。我用这个脚本做到了。但是如果我" view-source: "在我的 url 之前写,源代码将被显示。我怎样才能解决这个问题?有没有可能隐藏源代码?好的答案必须赞赏
<script>
document.onkeydown = function(e) {
if(e.keyCode == 123) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)){
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)){
return false;
}
if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)){
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)){
return false;
}
}
</script>
Run Code Online (Sandbox Code Playgroud) 我有一个我在网站上使用的播放器.
我想改变播放按钮的外观.
我想用虚线边框做这个,然后增加破折号之间的空间.那没用.
我无法使用图像.有CSS(3)解决方案吗?
我希望它看起来像这样.
这真的是关于角落!
-------------更新----------------
所以我使用了@Naila的解决方案来使它工作.针对以下问题运行:
我使用Video.js插件WordPress,我正在创建一个新的皮肤
当我跟着时,css我发现已经有一个::before处理游戏箭头的-pseudo.
::before箭头的-pseudo表示宽度为100%,这有助于箭头位于中心.因为我使用30%的宽度使边框成为一个角落.这会覆盖100%的早期宽度.导致以下结果:
这是:
CodePen
如果您刚刚在CSS字段中浏览此CSS,您将获得我现在所处的位置并查看问题:
/*
Player Skin Designer for Video.js
http://videojs.com
To customize the player skin edit
the CSS below. Click "details"
below to add comments or questions.
This file uses some SCSS. Learn more
at http://sass-lang.com/guide)
This designer can be linked to at:
http://codepen.io/heff/pen/EarCt/left/?editors=010
*/
// The following are SCSS variables to automate some of the values.
// …Run Code Online (Sandbox Code Playgroud) .btn_style{
border: none;
outline: 0;
background: #edf1f2;
border-radius: 2px;
width: 90px;
height: 30px;
}
.btn_style:focus{
border: thin #c7d3d6 solid;
width: 90px;
height: 30px;
outline: 0 !important;
}Run Code Online (Sandbox Code Playgroud)
<button type="button" class="btn_style">Medium</button>Run Code Online (Sandbox Code Playgroud)
当我单击按钮时,文本会稍微移动。
任何帮助都会很棒。
谢谢。
我正在尝试使用 jquery 调整页脚的大小。到目前为止,当我调整窗口大小时,它没有添加类。我执行得对吗?
/* My jQuery: */
$(document).ready(function() {
$(window).on('resize', function(){
var win = $(this);
if (win.width() > 600) {
$("#anc").addClass('social-lg');
$("#ico").addClass("icon-lg");
} else {
$("#anc").addClass('social-sm');
$("#ico").addClass("icon-sm");
}
});
}); Run Code Online (Sandbox Code Playgroud)
/* My CSS: */
.social-lg div.col-md-12 > ul > li > a {
border: 2px solid #616161;
border-radius: 50%;
display: inline-block;
letter-spacing: normal;
text-align: center;
height: 4.25rem;
width: 4.25rem;
}
.icon-lg div.col-md-12 > ul > li > a > i {
padding-top: .5rem;
font-size: 2em;
}
.social-sm div.col-md-12 > ul …Run Code Online (Sandbox Code Playgroud)我希望在悬停个人资料照片后显示文字.我制作了一个"标题"标签,但它不能在不同的段落中显示文字.有其他方法可以做到这一点吗?
这是我的CSS代码:
.tooltip {
display:none;
position:absolute;
border:1px solid #333;
background-color:#161616;
border-radius:5px;
padding:10px;
color:#fff;
font-size:12px Arial;
}
Run Code Online (Sandbox Code Playgroud)
这是我的HTML代码:
<table style="width:100%">
<tr>
<td><a><img src="http://2017.igem.org/wiki/images/2/26/Andrew.PNG" width="200" height="200" class="masterTooltip" title="Name: Ching Yuet To; Major/Year: Cell and Molecular Biology/3 "></a></td>
<td><img src="http://2017.igem.org/wiki/images/d/de/Venus.PNG" width="200" height="200"></td>
<td><img src="http://2017.igem.org/wiki/images/8/84/Cathy.PNG" width="200" height="200"></td>
</tr>
</table>
<script>
$(function () {
$(document).tooltip({
content: function () {
return $(this).prop('title');
}
});
});
</script>
Run Code Online (Sandbox Code Playgroud) 也许这个问题很荒谬,但我想知道这个事实.我有一个li带有两个类的元素(见下文),但它没有像我预期的那样工作.有人知道原因吗?
.red:first-child {
color:#F00;
}
.blue:first-child {
color:#00F; /* not working */
}
.red:last-child {
color:#F00; /* not working */
}
.blue:last-child {
color:#00F;
}Run Code Online (Sandbox Code Playgroud)
<ul>
<li class="red">one</li> <!-- This is the first child of red -->
<li class="red">two</li>
<li class="red">three</li>
<li class="blue">one</li> <!-- and this first child of blue -->
<li class="blue">two</li>
<li class="blue">three</li>
</ul>Run Code Online (Sandbox Code Playgroud)
我已将输入类型重置按钮放在窗体内,但仍然无法正常工作.
<form method='post' action='process/update_news_action.php' >
<tr>
<td colspan='2' class="col-md-4">Update News Content</td>
</tr>
<tr >
<td colspan='2' class="col-md-8"><textarea name="news" id="text"><?php echo $rows["news"] ; ?></textarea></td>
</tr>
<tr>
<td class="col-md-4"><input name='submit' type="submit" value='Publish' class="btn btn-success" /></td>
<td class="col-md-4"><input name='reset' type="reset" value='Reset' class="btn btn-primary" /></td>
</tr>
</form>
Run Code Online (Sandbox Code Playgroud)
我也试过了 <button type="reset" value="Reset">Reset</button>
我有以下HTML和CSS片段,我想要"!" 不要强调,但确实如此.我究竟做错了什么?
p {
color:red;
text-decoration:
underline;
font-size: 1.2em;
}
span.none {
text-decoration: none;
}Run Code Online (Sandbox Code Playgroud)
<p class="p">Click the thumb<span class="none">!</span></p>Run Code Online (Sandbox Code Playgroud)
我有一个小任务,在使用桌面时需要并排两个按钮,然后在移动设备上它们堆叠在一起但尺寸没有减小。
我已经设法将它们堆叠在一起,但它们的大小不同?每当我定义按钮的%大小时,它们都会挤在一起,在设备视图中看起来很丑陋。
.button {
background-color: #f2f2f2;;
border: none;
color: #737373;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 4px;
border: 2px solid #003366;
font-family: sans-serif;
font-style: italic;
font-weight: bold;
font-size:0.875em;
display: inline-block;}
.button2 {
background-color: #003366;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 4px;
border: 2px solid #003366;
font-family: sans-serif;
font-style: italic;
font-weight: bold;
font-size:0.875em;
display: inline-block;} …Run Code Online (Sandbox Code Playgroud)假设我们有两个文本框 textbox1 和 textbox2
我将光标放在 textbox1 内,然后按 Tab 键。光标移动到文本框2。如何控制javascriptjQuery 中的 Tab 键行为。我想做的是textbox1抛出焦点事件的那一刻,我想检查某些条件(business condition),并基于它我想允许默认的 Tab 键行为或将光标指向我想要的位置。
有人可以指导我该怎么做吗?
我假设的是以下事件流程:在 textbox1 中按 Tab 键-> textbox1focusout 事件->textbox2选择。基本上我想要在 focusout 事件之后和 textbox2 选择之前进行一些控制。我之前使用过 jQuery focusout 事件,但它的作用是,它触发 focusout 事件并选择,这违背了我想在选择textbox2之前检查某些条件的目的textbox2