小编But*_*uts的帖子

如何使用CSS放大图像的特定位置

我使用以下代码放大图像:

<style type="text/css">
.thumbnail {
    width: 100%;
    height: 450px;
    overflow:hidden;
}
.image {
    width: 100%;
    height: 100%;    
}
.image img {
    -webkit-transition: all 1s ease; /* Safari and Chrome */
    -moz-transition: all 1s ease; /* Firefox */
    -ms-transition: all 1s ease; /* IE 9 */
    -o-transition: all 1s ease; /* Opera */
    transition: all 1s ease;
}
.image:hover img {
    -webkit-transform:scale(3); /* Safari and Chrome */
    -moz-transform:scale(3); /* Firefox */
    -ms-transform:scale(3); /* IE 9 */
    -o-transform:scale(3); /* Opera */
     transform:scale(3); …
Run Code Online (Sandbox Code Playgroud)

html css css3

6
推荐指数
1
解决办法
1719
查看次数

根据固定标题的高度偏移内容上边距

我有一个固定的标题。因此,它已从 HTML 流中移除,内容现在位于页眉下方的页面顶部。我不能只给 #main-content 一个 margin-top 因为我不知道标题的高度,因为它根据屏幕大小而变化。如何使边距顶部响应标题的高度?

<div class="header-fixed">
<h1>Logo</h1>
<nav>Home about contact</nav>
</div>
<div class="main-content">
<p>The content at the top is underneath the header
</p>
</div>
Run Code Online (Sandbox Code Playgroud)

请看我的JSfiddle

html css jquery

5
推荐指数
1
解决办法
7377
查看次数

从上到下而不是从左到右对引导列进行排序

我正在使用循环来调用引导列:

<div class="col-xs-2">
Content
</div>
Run Code Online (Sandbox Code Playgroud)

默认情况下,引导程序从左到右对列进行排序:

[ 1 ] --> [ 2 ] --> [ 3 ]
[ 4 ] --> [ 5 ] --> [ 6 ]
[ 7 ] --> [ 8 ] --> [ 9 ]
Run Code Online (Sandbox Code Playgroud)

对于这个特定的循环,我想从上到下排序:

[ 1 ]  [ 4 ]  [ 7 ]
  V      V      V
[ 2 ]  [ 5 ]  [ 8 ]
  V      V      V
[ 3 ]  [ 6 ]  [ 9 ]
Run Code Online (Sandbox Code Playgroud)

在仍然使用常规引导列的同时,如何才能最好地实现这一目标?

html css twitter-bootstrap

5
推荐指数
1
解决办法
2381
查看次数

使用清单 v3 在 Chrome 扩展新标签页中显示网站图标

我最近使用本指南将我的 chrome 扩展迁移到清单 v3: https ://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/

v3 manifest.json 文件不再支持使用chrome://favicon/. 浏览文档我找不到替代方案。我发现有一些文章说它可能会被移动到新的favicon权限并在命名空间下可用google.favicon。然而他们都是老的和推测性的,我尝试了这些推测但没有成功。

google-chrome-extension manifest.json

5
推荐指数
1
解决办法
1603
查看次数

如何将Webkit支持添加到calc?

我可以看到使用webkit时calc更兼容。通常,当您添加对Webkit或Moz的支持时,您会执行以下操作:

-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
Run Code Online (Sandbox Code Playgroud)

calc的正确语法是什么?

width: -webkit-calc(100% - 100px);
Run Code Online (Sandbox Code Playgroud)

css cross-browser

4
推荐指数
2
解决办法
1104
查看次数

使用PHP表单提交格式化的JSON

的index.php

<form name="postform" action="post.php" method="post" enctype="multipart/form-data">
<table class="postarea" id="postarea">
    <tbody>
<tr>    <td class="postblock">Date:</td><td><input type="text" name="startDate"></td></tr>
<tr>    <td class="postblock">Title:</td><td><input type="text" name="headline"></td></tr>
<tr>    <td class="postblock">Article:</td><td><textarea id="text" rows="5" cols="30" type="text" name="text"></textarea> </td> </tr>
<tr>    <td class="assetblock">Image address:</td><td><input type="text" name="media"></td></tr>
<tr>    <td class="assetblock">Image caption:</td><td><input type="text" name="caption"></td></tr>

<tr>    <td class="postblock"></td><td> <input type="submit" value="Submit Entry"> </td>    </tr>
</tbody>
</table>
</form>
</form>
Run Code Online (Sandbox Code Playgroud)

post.php中

<?php
// check if a form was submitted
if( !empty( $_POST ) ){
// convert form data to json format
$json = json_encode( …
Run Code Online (Sandbox Code Playgroud)

php forms json

3
推荐指数
1
解决办法
2万
查看次数