- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一些面板由一些元素填充。当这些元素溢出时,会出现水平滚动条。我想在面板右侧放一个箭头。我将箭头放入面板中,但它位于所有元素的底部。我希望它是可见的,定位在这个草稿中:
这是 HTML 代码:
<div class="container">
<div class="main">
<div id="menu" class="nav">
<ul>
<li>
<div class="commesse">
<a href="#"><img src="http://orig00.deviantart.net/fae8/f/2011/288/4/5/coca_cola_logo_png_by_ivettecaro-d4cxaok.png" class="logo"></a>
<ul class="matr">
<li><a href="#">Text 23</a></li>
<li><a href="#">Text 78</a></li>
<li><a href="#">Text 1351</a></li>
<li><a href="#">Text 63</a></li>
<li><a href="#">Text 81</a></li>
</ul>
</div>
<div class="arrow-overflow-x"></div>
</li>
<li>
<div class="commesse">
<a href="#"><img src="http://www.abondance.com/Bin/bing-logo.png" class="logo"></a>
<ul class="matr">
<li><a href="#">Text 1235</a></li>
<li><a href="#">Text 61</a></li>
<li><a href="#">Text 72</a></li>
<li><a href="#">Text 42</a></li>
<li><a href="#">Text 771</a></li>
<li><a href="#">Text 671,b</a></li>
<li><a href="#">Text 217.a</a></li>
<li><a href="#">Text 2754</a></li>
<li><a href="#">Text 2</a></li>
<li><a href="#">Text 887</a></li>
</ul>
</div>
</li>
<li>
<div class="commesse">
<a href="#">
<span class="user icon"><img class="img-circle" src="img/search.png"/></span>
<span>Text</span>
</a>
</div>
</li>
<li>
<a href="clienti/cliente1/cliente1.html">
<div class="commesse">
<span class="user icon"><img class="img-circle" src="https://cdn1.iconfinder.com/data/icons/hawcons/32/698627-icon-111-search-128.png"/></span>
<span>Text</span>
</div></a>
</li>
这是 CSS 代码:
*, *:after, *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
body, html { font-size: 15px; padding: 0; margin: 0; overflow-x: hidden;}
.main:after { clear: both;
body {
font-family: "Open Sans", Helvetica, sans-serif;
color: #89867e;
background: #f9f9f9;
background-image: url("../img/bg-commesse.jpg");
}
a {
color: #333;
text-decoration: none;
}
a:hover {
color: #fff;
}
.main {
max-width: 82.667em;
}
.logo {
max-height: 76px;
}
.nav ul {
margin: 0;
padding: 0;
list-style: none;
font-size: 1.5em;
font-weight: 300;
max-height: 388px;
}
.nav li {
display: flex;
float: none;
width: 100%;
height: 164px;
border: 2px solid rgba(255,255,255,0.1);
-webkit-border: 2px solid rgba(255,255,255,0.1);
-moz-border: 2px solid rgba(255,255,255,0.1);
-o-border: 2px solid rgba(255,255,255,0.1);
margin-bottom: 30px;
overflow-x: auto;
overflow-y: hidden;
}
.nav a {
color: rgba(249, 249, 249, .9);
text-decoration: none;
padding: 0em 0.8em 0em;
white-space: nowrap;
-webkit-transition: color .5s, background .5s, height .5s;
-moz-transition: color .5s, background .5s, height .5s;
-o-transition: color .5s, background .5s, height .5s;
-ms-transition: color .5s, background .5s, height .5s;
transition: color .5s, background .5s, height .5s;
}
.nav li span,
.nav li span.icon {
display: inline-block;
}
.nav li .icon + span {
font-size: 1.3em;
}
.icon + span {
position: relative;
top: -0.1em;
}
.commesse {
display: flex;
align-items: center;
}
.commesse ul li {
padding: 17px;
margin-left: 20px;
display: inline;
color: #fff;
font-size: 28px;
}
.commesse ul {
white-space: nowrap;
}
.nav li:nth-child(6n+1) {
background: #e87352;
}
.nav li:nth-child(6n+2) {
background: #ebc85e;
}
.nav li:nth-child(6n+3) {
background: #3bbec0;
}
.nav li:nth-child(6n+4) {
background: #4ad585;
}
.nav li:nth-child(6n+5) {
background: rgb(27, 54, 71);
}
.nav li:nth-child(6n+6) {
background: rgb(21, 40, 54);
}
.commesse li:nth-child(6n+1) {
background: rgb(208, 101, 3);
}
.commesse li:nth-child(6n+2) {
background: rgb(233, 147, 26);
}
.commesse li:nth-child(6n+3) {
background: rgb(22, 145, 190);
}
.commesse li:nth-child(6n+4) {
background: rgb(22, 107, 162);
}
.commesse li:nth-child(6n+5) {
background: rgb(27, 54, 71);
}
.commesse li:nth-child(6n+6) {
background: rgb(21, 40, 54);
}
.user{
border-radius: 50%;
display: block;
height: 120px;
width: 120px;
}
.user img{
background: none repeat scroll 0 0 #FFFFFF;
border: 4px solid #FFFFFF;
width: 100%;
vertical-align: middle;
}
.img-circle {
border-radius: 50%;
}
.matr a {
display: inherit;
color: inherit;
text-decoration: inherit;
padding: inherit;
white-space: inherit;
}
.arrow-overflow-x {
background-image: url("http://lib.store.yahoo.net/lib/artbook/largerightarrowblack.png");
background-position: center center;
background-repeat: no-repeat;
background-size: contain;
content: "";
display: table;
height: 30px;
width: 30px;
margin: 0px;
}
这是运行代码:JSFIDDLE谢谢!
最佳答案
我在 Table 标签的帮助下进行了尝试。
<table>
<tr>
<td>
<ul class="matr">
<li><a href="#">Text 23</a></li>
<li><a href="#">Text 78</a></li>
<li><a href="#">Text 1351</a></li>
<li><a href="#">Text 63</a></li>
<li><a href="#"> tex</a></li>
</ul>
</td>
</tr>
<tr style="height:25px;">
<td ><div class="arrow-overflow-x"/></td>
</tr>
</table>
请在此处检查输出。 https://jsfiddle.net/b2w0e9yt/1/
希望对您有所帮助。
关于html - 在html中的div右侧插入箭头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34923389/
我有一个 PSD 布局要开发,还有一些东西,比如“卡片”,我很好奇我是否可以在没有图像的情况下只使用 CSS3 边框来做到这一点。 http://i.imgur.com/NSZYPsh.png (这些
我想添加一个轻量级的导航栏来切换登录和注册。结果应如下所示: 箭头应指示当前所选页面。 最佳答案 引用这个question ,问题中的 UI 与您的相似,并且可以根据您的需要调整答案中使用的概念。 关
我想创建一个元组,它包含一个箭头和一个描述箭头的字符串。如果我使用函数(而不是箭头)这样做,则以下工作如预期: funTimes10 = (*10) describe10 = "times 10" t
var std_obj = { activeEffect : 'fade', name : 'Jane', displayMe() { const doSomeEffects =
我有一个使用TActionToolBar和TActionManager的工具栏。一个按钮具有子按钮,这些子按钮可通过单击按钮右侧的向下小箭头来使用。 “向下箭头”按钮的宽度非常薄,需要精确的鼠标控制。
我正在使用 Javascript 进行流网络可视化。顶点表示为圆圈,边表示为箭头。 这是我的 Edge 类: function Edge(u, v) { this.u = u; // start
这个问题已经有答案了: Show border triangle in navbar using CSS (3 个回答) 已关闭 7 年前。 我有一个列表菜单,其边框宽度为 1px ...100%。
有什么方法可以从 javafx 2.2 表列中的排序表列中删除排序指示符/箭头吗? 最佳答案 这可以通过 css 来完成 .table-view .arrow { -fx-background
在我的应用程序中,我使用了 googlemap。在那,我在一个特定的位置放置了一个物体(自行车或汽车)。然后我搬到了其他地方。现在,根据我当前的位置,我需要显示一个箭头(校园),即我放置汽车或自行车的
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and t
我一直在 goole 中搜索如何仅使用 css 创建箭头和框。我在这里找到了一个近乎完美的例子:- http://dabblet.com/gist/4639593 如何更改此代码,使箭头指向左而不是右
嗨,我正在为这个问题挠头。我想创建一个如图所示的 CSS 渐变箭头,并能够将红色部分的填充定义为百分比。红色 block 只是纯色。 从这里JFiddle示例 我在创建绿色箭头方面取得了一些进展,但三
我刚刚开始在 Android 中创建一些自定义 View ,但在圆外绘制位图(箭头)时遇到问题。 这是我的代码: Canvas osCanvas = new Canvas(windowFrame);
我正在尝试绘制一个具有渐变的左侧箭头。这是我正在使用的代码,但我不明白为什么它不起作用。 .left-arrow{ position: relative; &:after{ rig
是否可以使用 GD 在 PHP 中创建此图像?我知道我需要使用 GD 和 imagecreate、imagecolorallocate、imagedestroy 等...但我不知道如何做曲线 我需要用
我在我的区域 map 中有一个我正在使用的工具台 http://qtip2.com/ 我调用工具提示时的代码与这个问题中的相同Tooltip on map area tag jQuery(docume
我正在尝试在 Haskell 中学习 Arrows,所以我正在使用基于箭头的 HXT 库为 XML 编写一个简单的应用程序。 HXT wiki 和教程中的示例放弃了函数类型签名。但是,我非常喜欢类型,
我一直在使用 Haskell(特别是 Yampa)中的 Arrowized FRP 库,但我不太清楚如何进行“连续”切换。我的意思是信号通过信号函数(下面的 sf),它本身就是一个信号(如图像的上半部
我想要一个引用,清楚地说明 PHP 的箭头/方法调用运算符 (->) 在运算符绑定(bind)顺序方面的位置。 不幸的是,authoritative PHP manual page关于运算符优先级没有
如何隐藏 QScrollBar 箭头? 我需要隐藏在水平滚动条中。 我试图用 setStyleSheet 隐藏: setStyleSheet(" QScrollBar:left-arrow:horiz
我是一名优秀的程序员,十分优秀!