我正在创建一个div,它必须在右上角有一个关闭按钮,就像在 图像中一样http://rookery9.aviary.com.s3.amazonaws.com/4655000/4655386_f01b_150x250.jpg
第一张图片是在photoshop中制作的.我正在尝试使用CSS做同样的事情."Fechar"是关闭按钮(葡萄牙语).使用干净的CSS和Web标准,没有变通方法正确定位它的更好方法是什么?
这是我的代码:http://jsfiddle.net/wZJnd/
这是我能达到的目标.
我有以下网址
http://somesite/somepage.aspx
Run Code Online (Sandbox Code Playgroud)
我传递一个查询参数值,该值具有另一个带有这样的查询参数的URL.
http://somesite/somepage.aspx?pageURL = http://someothersite/someotherpage.aspx?param1 = value&source = http:// anotheronesite/anotherpage
我需要将pageURL值作为粗体字母中的值.但我得到了
http://someothersite/someotherpage.aspx?param1=value
Run Code Online (Sandbox Code Playgroud)
而且我没有得到源代码.我正在使用以下JavaScript函数 -
function getParameterByName( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return decodeURIComponent(results[1].replace(/\+/g, " "));
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
简单的问题,简单的代码.这有效:
$x = &$_SESSION['foo'];
Run Code Online (Sandbox Code Playgroud)
这不是:
$x = (isset($_SESSION['foo']))?&$_SESSION['foo']:false;
Run Code Online (Sandbox Code Playgroud)
它抛出PHP Parse error: syntax error, unexpected '&'.使用条件运算符时是否无法通过引用传递,为什么不呢?如果?和之间有空格也会发生&.
我想用我自己创建的样式替换编辑器功能区上的HTML样式下拉列表中的HTML编辑器样式.根据这篇MSDN文章http://msdn.microsoft.com/en-gb/library/ms551040.aspx,一旦我开始将以模式开头的类ms-rteCustom-XXXX(XXXX是自定义名称)放入页面中加载的CSS中,应更换现有的款式.我希望这只留下下拉列表中的样式,但是我可以看到所有原始的Sharepoint样式,然后是我的样式.
我在文档中遗漏了什么,还是对我撒谎?据我所知,原始样式来自corev4.css,它也是由母版页加载的,但是当我的CSS稍后加载时,似乎应该清除下拉列表中已有的任何样式.
这是我正在使用的CSS中的一个新/自定义样式;
H3.ms-rteElement-H3CompanyName
{
-ms-name:"Heading 3";
}
.ms-rteElement-H3CompanyName
{
font-family: Arial, Helvetica, sans-serif;
font-size: small;
font-style: normal;
line-height: normal;
font-weight: bold;
font-variant: normal;
text-transform: none;
color: #000000;
}
Run Code Online (Sandbox Code Playgroud) 我正在使用TabControlWPF中的类,我注意到每个内容的TabItem所有边都有4像素的默认边距.
示例代码:
<Window x:Class="TabControlPadding.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<TabControl Margin="10">
<TabItem Header="Tab 1">
<Grid Background="Pink"/>
</TabItem>
<TabItem Header="Tab 2">
<Grid Background="LightBlue"/>
</TabItem>
</TabControl>
</Grid>
</Window>
Run Code Online (Sandbox Code Playgroud)
截图:

我想摆脱这个边际(将其减少到零),但我宁愿不必完全替换模板或类似的任何重量.
有一种简单的方法可以以非常有针对性的方式做到这一点吗?
我正在返回一个Json'ed匿名类型:
IList<MyClass> listOfStuff = GetListOfStuff();
return Json(
new {
stuff = listOfStuff
}
);
Run Code Online (Sandbox Code Playgroud)
在某些情况下,我知道这listOfStuff将是空的.所以我不想要调用的开销GetListOfStuff()(这使得数据库调用).
所以在这种情况下我写的是:
return Json(
new {
stuff = new List<ListOfStuff>()
}
);
Run Code Online (Sandbox Code Playgroud)
这似乎有点不必要的冗长.我不在乎List它是什么类型,因为它无论如何都是空的.
是否有可用于表示空枚举/列表/数组的简写?就像是:
return Json(
new {
stuff = new []
}
);
Run Code Online (Sandbox Code Playgroud)
或者我编程JavaScript的时间太长了?:)
在C#中
var parameters =
from line in parameterTextBox.Lines
select new {name = line.Split(' ').First(), value = line.Split(' ').Skip(1)};
Run Code Online (Sandbox Code Playgroud)
有没有办法做到这一点,而不必分裂两次?
我有一个表有3列代表公交车路线的停靠点.
ID
stop_name
stop_order
Run Code Online (Sandbox Code Playgroud)
我想要返回一个从当前停止开始的停靠列表(我知道).因此,如果当前停止是第5号停止,则返回的内容如下:
stop_order
5
6
7
8
1
2
3
4
Run Code Online (Sandbox Code Playgroud)
我试过了:
Select * from routes where stop_order >= 3 and route = 'Red'
Union
Select * from routes where stop_order < 3 and route = 'Red
Run Code Online (Sandbox Code Playgroud)
如果数据按停靠顺序输入表中,则可以正常工作.如果不是,则按照输入的顺序返回数据.
所以我插入了一个iPhone,并按下了大Use Device For Development按钮,现在我想禁用它,因为我不再需要它.
本Developer项Settings.app设备上是烦人.我如何停止使用它进行开发?
它已经轻松搞定加入到我们的网站法语和西班牙语翻译,但我们要添加海地克里奥尔语现在有没有为它文化的支持.完成这项工作的最佳方法是什么?
c# ×2
css ×2
.net-3.5 ×1
asp.net-mvc ×1
enumerable ×1
iphone ×1
javascript ×1
layout ×1
linq ×1
list ×1
margin ×1
mysql ×1
php ×1
query-string ×1
regex ×1
sql ×1
sql-order-by ×1
string ×1
tabcontrol ×1
tabitem ×1
url ×1
wpf ×1
xcode ×1