我正在尝试为DIV添加宽度,但我似乎遇到了问题,因为它没有内容.这是我到目前为止的CSS和HTML,但它不起作用:
body{
margin:0 auto;
width:1000px
}
ul{
width:800px;
}
ul li{
clear:both;
}
.test1{
width:200px;
float:left;
}
Run Code Online (Sandbox Code Playgroud)
<body>
<div id="test">
<ul>
<li>
<div class="test1">width1</div>
<div class="test1">width2</div>
<div class="test1">width3</div>
</li>
<li>
<div class="test1"></div>
<div class="test1">width2</div>
<div class="test1">width3</div>
</li>
<li>
<div class="test1"></div>
<div class="test1">width2</div>
<div class="test1">width3</div>
</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
这是HTML布局:
<div class="wrap">
<div id="container">
<div id="left">...</div>
<div id="right">...</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我用float: left
左边的div和float: right
右边的div.然后,我使用padding-top: 10px
了容器.为什么不起作用?谢谢.
这是我的第一个风格:
.wrap {
float: left;
width: 1000px
}
#container{
background-color: #FFFFFF;
padding: 10px 10px 0;
width: 980px;
float: left;
}
#left {
float: left;
width: 670px;
}
#right {
float: right;
width: 300px;
}
Run Code Online (Sandbox Code Playgroud)
function get_data($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
Run Code Online (Sandbox Code Playgroud)
我从互联网上找到这个功能.当我使用此代码在php文件中测试它$returned_content = get_data('http://google.com');
但它无法工作.并获得"301 Moved Permanently"文档已移至此处.错误.为什么?
这是专业drupal书的一个例子.
function annotate_admin_settings() {
$options = node_get_types('names');
$form['annotate_node_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Users may annotate these content types'),
'#options' => $options,
'#default_value' => variable_get('annotate_node_types', array('page')),
'#description' => t('A text field will be available on these content types to
make user-specific notes.'),
);
return system_settings_form($form);
}
Run Code Online (Sandbox Code Playgroud)
但是形成drupal文档,表单风格的构建器就是这样.
function mymodule_myform($form_state) {
}
Run Code Online (Sandbox Code Playgroud)
函数中有一个参数($ form_state),当我应该使用这个参数时.谢谢你.
1:为什么结果foo && baz
不是1?因为真是1.
var foo = 1;
var baz = 2;
foo && baz; // returns 2, which is true
Run Code Online (Sandbox Code Playgroud)
2:有两个优点console.log(foo + +bar);
,它们的含义是什么?
var foo = 1;
var bar = '2';
console.log(foo + +bar);
Run Code Online (Sandbox Code Playgroud) 1,缓存在表cache_form中的记录是什么?
2,我网站的cache_form表太大了(1.0G).cron已经工作了一个月.当我手动运行它,它仍然无法正常工作.为什么.drupal版本是6.19.
(function(){
var foo = 'Hello world';
})();
Run Code Online (Sandbox Code Playgroud)
我不知道它的用途是什么?它是什么意思/?
http://phplist.xxmn.com/node/1
为什么位于页面中心的两个红色框(在Tags :)下没有边框底部?两个红色框html标签是
<span>
Run Code Online (Sandbox Code Playgroud)
我申请了
border:1px solid red;
Run Code Online (Sandbox Code Playgroud)
它.但是在IE7下,边框底部没有显示,firefox还可以.out div框(id = vistor_comment)太高了,而不是firefox?为什么?如何改变它.谢谢.
是什么意思$_REQUEST['page']
,这一行
$total = $GLOBALS['pager_total_items'][0];
Run Code Online (Sandbox Code Playgroud)
在Drupal 6?
现在,如果我想覆盖由Book模块生成的$ block->内容...如何覆盖它并自定义标题列表?谢谢.