我想要一个带有粘性页脚的页面,其滚动条不会与标题重叠,只有正文.就像我在这个小提琴里做的那样.但现在我想要的内容(虚线框)有100%的身高.
HTML
<div class="navbar navbar-inverse navbar-fixed-top"></div>
<div class="container">
<div class="content-container">
<div class="my_content">Full height ??</div>
<div class="push"></div>
</div>
<div class="footer"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
html,
body {
height: 100%;
overflow: hidden;
}
body {
padding-top: 50px;
}
.container {
overflow-y: auto;
overflow-x: hidden;
height: 100%;
}
.content-container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
position: relative;
padding-top: 15px;
padding-bottom: 15px;
min-height: 100%;
margin-bottom: -60px;
}
.footer {
position: relative;
width: 100%;
background-color: red;
}
.footer,
.push {
height: 60px; …Run Code Online (Sandbox Code Playgroud) 我在这里遇到一些问题,需要一些帮助.我认为这很容易,但我无法弄清楚自己发生了什么.请看下面的小提琴:
当我只打开模态并第一次点击它时.它正常工作,但是当我重新打开它时,就会出现问题.它不止一次触发on click事件.
HTML
<button data-target="#mergeFieldsModal" data-toggle="modal" data-message-id="#message" class="btn btn-info">Open Modal</button>
<div id="result"></div>
<div id="mergeFieldsModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h3 class="modal-title"><span class="ss-shuffle ss-icon"></span> Merge Fields</h3>
</div>
<div class="modal-body">
<p>Click Add. After clicking add, open the modal again then click add again to see the problem.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" id="btnMergeField" class="btn btn-primary">Add</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- …Run Code Online (Sandbox Code Playgroud) 由于某种原因,它将按钮放在div的外面,就在右上角的上方.好像就在div的右上角上方就像右下角一样.
例如,如果我添加底部10px,它将从div开始并将其向上移动10px.同样的事情发生在右边
CSS:
#newSignupContent {
display: block;
position: relative;
width: 400px;
height: 250px;
margin: auto auto;
}
#newSignupContent label {
display: inline-block;
float: left;
clear: left;
width: 40%;
padding-right: 10px;
text-align: right;
color: white;
font-family:calibri, Times, serif;
font-size: 22px;
}
#newSignupContent input {
display: inline-block;
width: 50%;
float: left;
padding: 5px 10px 5px 0px;
}
#newSignupContent #newSignupSubmit {
position: absolute;
bottom: 0;
right: 0;
width: 80px;
height: 40px;
padding: 5px 10px 5px 10px;
}
Run Code Online (Sandbox Code Playgroud)
形成:
<div id="newSignupContent">
<form action="/webroot/NewUserSignUpProcess" method="post"> …Run Code Online (Sandbox Code Playgroud) 这个小提琴几乎就是我正在寻找的,我是从MDN那里得到的.唯一缺少的是我想让它更顺畅.有没有办法在不使用jQuery或任何其他插件的情况下做到这一点?
var button = document.getElementById('slide');
button.onclick = function () {
document.getElementById('container').scrollLeft += 100;
};
var back = document.getElementById('slideBack');
back.onclick = function () {
document.getElementById('container').scrollLeft -= 100;
};
Run Code Online (Sandbox Code Playgroud) HTML
<ul>
<li>List 1</li>
<li>List 2</li>
<ul>
Run Code Online (Sandbox Code Playgroud)
jQuery的
$('ul li').text();
Run Code Online (Sandbox Code Playgroud)
电流输出
List1List2
Run Code Online (Sandbox Code Playgroud)
预期产出
List1,List2
Run Code Online (Sandbox Code Playgroud)
题
如何用逗号分隔它们?
当laravel 5尚未发布时,我使用此命令安装Laravel 4 composer create-project laravel/laravel your-project-name --prefer-dist.但是现在当我使用它时,它安装了laravel 5.我只想使用laravel 4,尚未准备好5.
我是c#的新手,我不知道我是否做得对.我的问题是我需要从类(.dll)返回错误,但我不知道如何.它只返回true或false.这是我班级的代码:
namespace DigitalAssetConverter
{
public class ConvertImage
{
public Boolean ImagePath(string filePath)
{
try
{
MagickReadSettings settings = new MagickReadSettings();
settings.ColorSpace = ColorSpace.RGB;
using (MagickImage image = new MagickImage(filePath))
{
image.Read(filePath, settings);
image.Resize(500, 500);
image.Write(Path.ChangeExtension(filePath, ".jpg"));
return true;
}
}
catch
{
return false;
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我这样使用它:
private void btnConvert_Click(object sender, EventArgs e)
{
ConvertImage ci = new ConvertImage();
if (ci.ImagePath(@"C:\tryConvert\LP_10078.eps"))
{
MessageBox.Show("Success!");
}
else
{
MessageBox.Show("Failed.");
}
}
Run Code Online (Sandbox Code Playgroud) 为什么我有这个错误?如果您查看屏幕截图,您将看到数据库。只有当我连接到两个数据库引擎时才会发生这种情况。它只检测下面的数据库引擎中的数据库,而不是突出显示的数据库。
除了关闭应用程序并仅打开一个数据库引擎之外,还有其他方法可以使用我的数据库吗?

怎么把:在跨度之后?我知道我之前做过这个,但我不记得怎么做了.这是小提琴.
HTML
<span>Stack Overflow</span>
Run Code Online (Sandbox Code Playgroud)
CSS
span{
background:#000;
position:relative;
color:#fff;
z-index:20;
}
span:before{
content:'';
background:#000;
position:absolute;
left:50%;
bottom:-10px;
width:20px;
height:20px;
z-index:1;
}
Run Code Online (Sandbox Code Playgroud)
如何data-val才能通过class不使用而获得所有值id?我只能得到第一个.我认为这可以通过使用循环来完成,但我不太确定.
/* JS */
var dataValue = $('.test').data('val');
$('#result').append('Result: ' + dataValue);Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- HTML -->
<div data-val="1" class="test"></div>
<div data-val="2" class="test"></div>
<div data-val="3" class="test"></div>
<div id="result"></div>Run Code Online (Sandbox Code Playgroud)
使用jQuery来获取带有.each()的数据属性值并不重复,因为我没有要求HOW使用.each()我要求使用什么,并且each()原始帖子中没有任何功能.
我不确定这是什么标题.我的问题是,点击并更改标题后,它不再启动on click了.
请看下面的小提琴:
HTML
<h2><span class="ss-icon ss-repeat"></span>
<span id="campaignEditTitle">Click Me to Edit <small><span class="ss-write"></span></small></span>
<small> 3 Messages (2 active, 1 draft)
</small>
</h2>
Run Code Online (Sandbox Code Playgroud)
JS
$('#campaignEditTitle').on('click', function(){
var title = $(this).text();
$(this).replaceWith('<input id="campaignInputTitle" type="text" value="' + title + '">');
console.log(title);
$('#campaignInputTitle').keypress(function(e) {
if(e.which == 13) {
var newTitle = $(this).val();
$(this).replaceWith('<span id="campaignEditTitle">' + newTitle + '<small><span class="ss-write"></span></small>');
}
});
$('#campaignInputTitle').on('blur', function(){
var newTitle = $(this).val();
$(this).replaceWith('<span id="campaignEditTitle">' + newTitle + '<small><span class="ss-write"></span></small>');
});
});
Run Code Online (Sandbox Code Playgroud) javascript ×5
css ×4
html ×4
jquery ×4
c# ×2
class ×1
css-position ×1
css3 ×1
directory ×1
html5 ×1
imagemagick ×1
installation ×1
laravel ×1
sql ×1