标签: border

视口边框

我想在网页的视口周围有一个 8px 的纯黑色边框。它不滚动,内容从它的“后面”滚动。它是透明的。如果我使用具有大 z-index 的固定 div,它将阻止与其下的元素进行交互。

我怎样才能做到这一点?我可以制作 4 个 div,每边一个,左右宽度为 8px,顶部和底部高度为 8px,但这似乎是解决这个问题的糟糕方法。

谢谢你。

html css border

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

Div 边框未显示在正确的位置

我有一个带有蓝色边框的 div。这个 div 是页脚,所以它被放置在页面的底部。该 div 内的文本显示在底部,但边框本身显示在顶部。

这是 HTML:

<body>

<div id="header">
this is the header
</div>

<div id="mainleft">
this is the main left
</div>

<div id="mainright">
this is the main right
</div>

<div id="footer">
this is the footer
</div>

</body>
Run Code Online (Sandbox Code Playgroud)

这是CSS:

body{
    background-color:#666666;
}

#header{
    min-height:75px;
    border:3px solid #000099;
}

#mainleft{
    height:500px;
    width:15%;
    border-left:3px solid #000099;
    float:left;
}
#mainright{
    height:500px;
    width:84%;
    border-left:3px solid #000099;
    border-right:3px solid #000099;
    float:right;
}

#footer{
    height:70px;
    width:100%;
    border:3px solid #098099;
    bottom:0px;
}
Run Code Online (Sandbox Code Playgroud)

html css border

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

onclick 按钮边框颜色更改

应该相当简单,但我迷路了,所有搜索都会产生与我的问题没有直接关系的非特定答案。

按钮,边框是黑色的,但显然,“压抑”的感觉是通过将边框颜色更改为黑色来实现的,因此当我单击按钮时,感觉“死了”。什么也没有发生,因此很难判断您是否未点击或发生了什么。

如何更改“onclick”边框颜色?这样,它可以再次获得“沮丧”的外观。

.addButton {
border-color:black;
border-width:1px;
background-color:#00B0F0;
text-decoration:underline;
}
Run Code Online (Sandbox Code Playgroud)

html border buttonclick

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

从 Excel VBA 设置单词表边框

我正在尝试从 Excel VBA 设置单词表的边框。许多网站建议如下:

wrdTable.Borders(wdBorderTop).LineStyle = wdLineStyleSingle
Run Code Online (Sandbox Code Playgroud)

但是在尝试时出现错误(集合的请求成员不存在)。但是,我可以使用以下代码带内边框:

wrdTable.Borders(xlDiagonalUp).LineStyle = xlContinuous
Run Code Online (Sandbox Code Playgroud)

同样我试过:

wrdTable.Borders(xlEdgeTop).LineStyle = xlContinuous
Run Code Online (Sandbox Code Playgroud)

带上边框,但我得到对角线。如何在我的单词表中应用边框(内边框和外边框)?我正在使用 Office 2007。

excel vba border

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

指定百分比高度时,Chrome 中的边框消失

我有一个1-pixel-border 和height:29%div。出于某种原因,Chrome 渲染它没有底部边框。

http://jsfiddle.net/9WVuC/4/

此问题取决于实际百分比值和容器大小;当我更改它们时,边框有时会出现有时会消失。Chrome 渲染引擎在计算实际div的高度时似乎存在一些舍入错误。此外,仅当为该div指定了溢出位置时才会发生。

这是一个已知的错误,也许存在一些解决方法?当然,我可以通过手动重新计算高度并使用 JS 设置来摆脱该百分比值,但这不是很优雅的解决方案。

css google-chrome border percentage

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

WPF 更改粗细左边框文本框

我必须在 WPF 中更改文本框的粗细,但我不知道如何仅更改一个边框。

我该怎么做?

这是我的代码

<TextBox HorizontalAlignment="Left" Height="23" Margin="215,144,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120"/>
Run Code Online (Sandbox Code Playgroud)

c# wpf textbox border

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

itextsharp html 到 pdf 创建没有边框

我使用 iTextSharp(在 SharePoint 上,但我希望这无关紧要)将 HTML 文档转换为 PDF。到目前为止,我无法在元素周围获得任何边框。我该怎么做呢?这不支持吗?

我尝试过的事情:

  // in c# code
StyleSheet styles = new iTextSharp.text.html.simpleparser.StyleSheet();
styles.LoadStyle("borderCls", "border-style", "solid"); // <td class="borderCls">
styles.LoadStyle("borderCls", "border-width", "1px");
styles.LoadStyle("borderCls", "border-color", "#000");
  //
styles.LoadStyle("borderCls", "border", "solid 1px #000");

  // in html
<td style="border:solid 1px #000">
  //
<td border="1">
  //
<td style="border-style:solid;border-width:1px">
Run Code Online (Sandbox Code Playgroud)

但这些都不起作用。我只是无法让 iTextSharp 创建任何边框。

更新:也可以只在特定的一侧定义一个边框吗?

html c# border itextsharp

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

CSS:为什么1px边框渲染为1.111px?

我不明白为什么caseButtonBarRow2 div宽度呈现为297.778px.它应该是300px,对吗?我这是我的border: 1px #FF2F2A solid;.这似乎是以1.111px的大小呈现....但为什么呢?这是容器中的几个div级别,固定宽度为310px(左/右填充为5px).顶级div是唯一具有固定宽度的div,所以我 caseButtonBarRow2应该延伸到300px,对吗?

HTML:

<div id="caseButtonBarRow2" class="buttonBarRow">
    <div style="position: relative;">
        <a id="MainContent_Case7CheckBox_ToggleButton" href="" title="UNSELECTED" style="position: absolute; left: 0px; top: 0px; width: 40px; height: 40px; font-size: 40px; background-image: url(https://jimasta-laptop/ExaminerGradeSheet/images/ExaminerButton7_unchecked.png); background-repeat: no-repeat;"></a>
    </div>
    <input data-act-togglebuttonextender="imageWidth:40,imageHeight:40,uncheckedImageUrl:'images/ExaminerButton7_unchecked.png',checkedImageUrl:'images/ExaminerButton_checked.png',uncheckedImageAlternateText:'UNSELECTED',checkedImageAlternateText:'Case 7',id:'MainContent_ctl230'" id="MainContent_Case7CheckBox" type="checkbox" name="ctl00$MainContent$Case7CheckBox" style="visibility: hidden;">

    <div style="position: relative;"><a id="MainContent_Case8CheckBox_ToggleButton" href="" title="UNSELECTED" style="position: absolute; left: 0px; top: 0px; width: 40px; height: 40px; font-size: 40px; background-image: url(https://jimasta-laptop/ExaminerGradeSheet/images/ExaminerButton8_unchecked.png); background-repeat: no-repeat;">

        </a>
    </div>
    <input data-act-togglebuttonextender="imageWidth:40,imageHeight:40,uncheckedImageUrl:'images/ExaminerButton8_unchecked.png',checkedImageUrl:'images/ExaminerButton_checked.png',uncheckedImageAlternateText:'UNSELECTED',checkedImageAlternateText:'Case 8',id:'MainContent_ctl232'" id="MainContent_Case8CheckBox" type="checkbox" name="ctl00$MainContent$Case8CheckBox" style="visibility: hidden;">

    <div …
Run Code Online (Sandbox Code Playgroud)

html css size border width

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

如何在悬停在图像上时放大,但让边框保持原位?

我是CSS和HTML的新手,我想创建一个在悬停时快速放大的图像.但是盒子半径也会放大.我知道我的div课程出了问题,但我无法弄明白究竟是什么.

所以我的意思是我想要这样的效果:http: //designshack.net/tutorialexamples/imagehovers/zoomandpan.html (金发女郎一个)

这是相关代码:

 #circle {
    border: 4px solid;
height:200px;
width:200px;
    border-color: #000;
    border-radius: 100px;
    }



.bolimg{
background: url('http://i60.tinypic.com/wb82e0.jpg') no-repeat; 
height:200px;
width:200px;
-webkit-border-radius: 100px;
    -webkit-transition: 2s ease-out;
     -moz-transition: 2s ease-out;
     -o-transition: 2s ease-out;
     -ms-transition: 2s ease-out;
     transition: 2s ease-out;
}


.bolimg:hover {
    opacity:1;
     background-image: url('http://i59.tinypic.com/k0szuv.jpg'); 
     -webkit-transition: 2.5s ease-out;
     -moz-transition: 2.5s ease-out;
     -o-transition: 2.5s ease-out;
     -ms-transition: 2.5s ease-out;
     transition: 2.5s ease-out;
      -webkit-transform:scale(1.25); /* Safari and Chrome */
    -moz-transform:scale(1.25); /* Firefox */
    -ms-transform:scale(1.25); /* IE 9 */
    -o-transform:scale(1.25); /* …
Run Code Online (Sandbox Code Playgroud)

css border zoom hover image-zoom

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

Android EditText边框背景颜色

在我的应用程序中,我设置EditText了边框背景颜色,它在所有设备上都能正常工作,但在我的4.1.2设备上整个EditText显示为黑色.我可以在其中输入文字,一切正常,但文字不可见,因为它EditText是完全黑色的.如果我删除背景边框颜色,它工作正常.

这是我的edittext的xml代码.

<EditText
     android:id="@+id/et_date_from"
     android:layout_width="wrap_content"
     android:layout_height="match_parent"
     android:layout_weight="0.68"
     android:background="@drawable/edittext_border"
     android:ems="10" />
Run Code Online (Sandbox Code Playgroud)

edittext_border.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle"
    android:thickness="0dp" >

    <stroke
        android:width="1dp"
        android:color="@color/test_blue_light" />

    <corners android:radius="5dp" />

</shape>
Run Code Online (Sandbox Code Playgroud)

请给我任何解决方案.

android border colors android-layout android-edittext

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