我创建了一个按钮,我想为该按钮添加涟漪效果和渐变!
这是我的按钮代码:
<Button
android:id="@+id/percentageButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/gradient"
android:gravity="center"
android:text="%"
android:textColor="@android:color/white"
android:textSize="30dp">
</Button>
Run Code Online (Sandbox Code Playgroud)
这是我的gradient.xml文件代码
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<corners
android:radius="0dp"/>
<gradient
android:gradientRadius="100"
android:centerX="49%"
android:centerY="50%"
android:centerColor="#434343"
android:startColor="#0F0F0F"
android:endColor="#141414"
android:type="radial"/>
</shape>
Run Code Online (Sandbox Code Playgroud)
我已经尝试了所有的可能性,但没有得到如何实现这一点。
我无法弄清楚为什么我的按钮样式在运行 safari 的笔记本电脑上与在这种情况下运行 safari 的 iPhone 手机相比会改变。
HTML代码:
<div id="img_container">
<img src="../assets/images/hotdrinks.png" style="hight:50%;">
<button class="button" onClick="parent.location='hotdrinks.html'"> Hot Drinks Menu </button>
</div>
<div id="img_container">
<img src="../assets/images/craftbeer.png" style="hight:50%;">
<button class="button" > Craft Club </button>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS 代码:
#img_container {
position:relative;
display:inline-block;
text-align:center;
}
.button {
position:absolute;
bottom:10px;
right:10px;
width:200px;
height:50px;
font-family: test;
color: #000000;
text-transform: uppercase;
font-size: 40px;
}
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' ); // 2.1 +
function woo_custom_cart_button_text( $text ) {
if( has_term( 'liners', 'product_cat' ) ){
$text = __( ' ', 'your-plugin' );
echo do_shortcode('<a href="#" class="popmake-923">Request ? Quote</a>');
}
return $text;
}
Run Code Online (Sandbox Code Playgroud)
我需要制作功能来替换一个特定产品类别的“添加到购物车”按钮 URL 和文本。
此按钮将触发带有联系表单的灯箱,此按钮的文本将是:Request a Quote。
我怎样才能让它按预期工作?
以下是它在此链接上的实际工作方式。
我在 React 表中有一个按钮,它根据相邻列中的值被禁用。例如,如果相邻列中的值是 Claimed,则该按钮将被禁用,但是如果它的值为 Failed 或为空,则可以单击该按钮。现在,我可以禁用按钮……但是按钮的颜色没有改变。我为按钮使用 Material UI React 组件。禁用时如何更改按钮的颜色?
代码如下所示:
<FlatButton
label="CLAIM"
disabled={
item.status === "Claimed" ||
item.status === "Progress" ||
item.status === "Resolved"
}
onClick={//Some action here}
labelStyle= {
{
color: '#FFFFFF',
fontWeight: 600,
fontSize: 11,
}}
style= {
{
borderRadius: '2px',
width: '60px',
border: 'solid 1px #d8dde3',
backgroundColor: '#00bfa5',
}}
Run Code Online (Sandbox Code Playgroud) 我有一个按钮,我想要一个稍微透明的覆盖层,以便在悬停时“滑过”按钮。
有一种叫做“涟漪效应”的东西,您通常可以通过单击按钮来实现。
像这里:https : //codepen.io/tomma5o/pen/zwyKya
HTML:
<div class="container">
<a data-animation="ripple">Click Me</a>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
:root {
/* if u want to change the color of
* the ripple change this value
*/
--color-ripple: rgba(255,255,255,0.8);
}
body {
background: #36353c;
}
.container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 50px;
width: 200px;
margin: auto;
}
*[data-animation="ripple"] {
position: relative; /*Position relative is required*/
height: 100%;
width: 100%;
display: block;
outline: none;:root {
/* if u want …Run Code Online (Sandbox Code Playgroud) 我有白色的操作栏,当我点击搜索视图按钮时,我能够获得搜索视图但无法获得搜索视图下方的行并且无法看到后退按钮。我想更改搜索视图后退按钮的颜色/完整图标,并且我想获取搜索视图下方的行。我用谷歌搜索并尝试了很多不同的方法,但没有运气。我也尝试过更改工具栏样式,但没有成功。我也在活动和片段中使用搜索视图..
我曾尝试更改工具栏样式,如下所示
<style name="ToolbarStyle" parent="@style/ThemeOverlay.AppCompat.ActionBar">
<!-- Customize color of navigation drawer icon and back arrow -->
<item name="colorControlNormal">@color/colorBlack</item>
<item name="android:collapseIcon" tools:ignore="NewApi">@mipmap/filter_red</item>
</style>
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激!!!!
提前致谢
我更改了按钮的 bootstrap css 类,更改了按钮颜色、字体大小和字体颜色等。
但是当我按下按钮并按住鼠标时,它会改变颜色。
我将颜色设置为绿色,但是当我单击按钮并按住鼠标时,它会变成蓝色。
这是按钮的css代码
.btn-outline-primary{
width: 220px;
background: #A4D555; /*2cc8df*/
border: none;
color: white;
font-weight:450;
}
.btn-outline-primary:hover{
background: #A4D555;
outline: none;
box-shadow: none;
}
.btn-outline-primary:focus{
background: #A4D555;
outline: none;
box-shadow: none;
}
.btn-outline-primary:active{
background: #A4D555;
outline: none;
box-shadow: none;
}Run Code Online (Sandbox Code Playgroud)
我一直在尝试使用 CSS 更改按钮字体但未能成功。我可以更改它们的背景颜色,也可以更改 textarea 输入的字体,但由于某种原因,我似乎无法更改按钮的字体。根据我有限的理解,以下代码应该可以工作:
<html>
<head>
<style>
body {
font-family: monospace;
}
input[type=button] {
font-family: monospace;
}
</style>
</head>
<body>
This is a button:
<input type = "button" value = "Please click">
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
但只更改文本的字体,而不是按钮。我错过了什么?
[更新]每响应这里我改input [type = button]到input[type=button]。
出于布局目的,我在 React Native 应用程序中的视图顶部渲染了多个图像。这些图像位于屏幕的顶部、左侧和右侧边框。它们包含在View具有透明背景的组件中。
这意味着屏幕的所有内容都将位于该View组件之后。我的问题是我现在无法触摸我的任何实际内容,因为它被透明覆盖View
问题:如何在 React-Native 中触摸透明视图后面的组件?
我不能成为第一个处理这个问题的人,但它似乎在线记录很差
button ×10
css ×4
html ×3
android ×2
javascript ×2
bootstrap-4 ×1
gradient ×1
hover ×1
ios ×1
java ×1
javafx ×1
jquery ×1
material-ui ×1
php ×1
product ×1
react-native ×1
reactjs ×1
ripple ×1
searchview ×1
styles ×1
transparency ×1
woocommerce ×1
wordpress ×1