我尝试使用现有的类btn-default设计一个bootstrap v3.3.5按钮,下面是我所做的代码示例.
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<style type="text/css">
.sign-in-facebook
{
background-image: url('http://i.stack.imgur.com/e2S63.png');
background-position: -9px -7px;
background-repeat: no-repeat;
background-size: 39px 43px;
padding-left: 41px;
color: #000;
}
.sign-in-facebook:hover
{
background-image: url('http://i.stack.imgur.com/e2S63.png');
background-position: -9px -7px;
background-repeat: no-repeat;
background-size: 39px 43px;
padding-left: 41px;
color: #000;
}
</style>
<p>My current button got white background<br/>
<input type="button" value="Sign In with Facebook" class="btn …Run Code Online (Sandbox Code Playgroud)我在我的项目中完成了Angularjs拖放方法.我在拖放方面没有任何问题,但是我在下一步操作后如何为可拖动元素制作样式时遇到了问题.
对于我的情况,如果用户将Goose和Rabbit拖到标有分娩的动物的框中,则用户将单击" 检查答案 "按钮.将有正确的或错误的每个draggble格以上符号.
我尝试检查元素,但我只看到这些样式:
[ng-drag] {
width: 50px;
height: 50px;
background: rgba(255, 255, 255, 0.5);
color: #131313;
text-align: center;
padding-top: 12px;
display: inline-block;
margin: 5px 5px;
cursor: move;
border: 1px solid #ccc;
border-radius: 4px;
}
Run Code Online (Sandbox Code Playgroud)
的NG-拖动指示施加到每个可拖动的元件.我如何区分每个元素并使其成为个性化风格?这件事让我很困惑,需要你们所有人的帮助.谁能帮我?
我真的很感激任何建议或帮助.
我的预期产量:
片段供您参考:
var myApp = angular.module('MyApp',['ngDraggable']).controller('MyCtrl',function($scope){
$scope.checkAnswer = function()
{
}
$scope.centerAnchor = true;
$scope.toggleCenterAnchor = function () {
$scope.centerAnchor = !$scope.centerAnchor
};
var onDraggableEvent = function (evt, data) { …Run Code Online (Sandbox Code Playgroud)我需要将每个字母放到每个答案容器中,而不是添加新的答案容器.看我的片段.我怎么能这样做?
var myApp = angular.module('myApp',['ngDragDrop']).controller('QuestionDetailsCtrl', function ($scope) {
//Scrabble word
$scope.ObjListAlphabet = [{alphabet: "J"},{alphabet: "L"},{alphabet: "W"},{alphabet: "E"},{alphabet: "B"},{alphabet: "A"},{alphabet: "T"},{alphabet: "U"}];
$scope.ObjAnswerList = [
{alphabet: ""},
{alphabet: ""},
{alphabet: ""},
{alphabet: ""},
{alphabet: ""},
{alphabet: ""}
];
$scope.list1 = {title: 'AngularJS - Drag Me'};
$scope.list2 = {};
});Run Code Online (Sandbox Code Playgroud)
.scrabble
{
display: inline !important;
text-align: center !important;
width:40px;
height:40px;
background-color:#ccc;
border:1px solid #ccc;
margin:2px;
float:left;
text-align:center;
padding-top:8px;
margin-right:10px;
}
.alphabet-scrabble
{
float: left;
color: white;
background-color: #3636ff;
margin: 2px;
width: 38px; …Run Code Online (Sandbox Code Playgroud)我有以下代码插入我的特定谷歌日历.它非常成功,但如何让用户可以添加到自己的日历?有人可以帮助我...我的预期结果就像用户可以通过谷歌登录....这意味着用户可以添加到他们自己的谷歌日历.谢谢.
要添加到我的特定日历的代码
require_once './vendor/google/apiclient/src/Google/autoload.php';
$key_file_location = 'Calendar-96992da17e2dda.p12'; // key.p12 to create in the Google API console
$client_id = '6094969424649-compute@developer.gserviceaccount.com';
$service_account_name = 'testsd-440@studied-zephyr-117012.iam.gserviceaccount.com'; // Email Address in the console account
if (strpos($client_id, "gserviceaccount") == false || !strlen($service_account_name) || !strlen($key_file_location)) {
echo "no credentials were set.";
exit;
}
/** We create service access ***/
$client = new Google_Client();
/************************************************
If we have an access token, we can carry on. (Otherwise, we'll get one with the help of an assertion credential.) …Run Code Online (Sandbox Code Playgroud) 如何在-任何DOM下搜索输出如下?
<p>-</p><p><span style="font-size: medium;">-</span></p>目前我只是使用下面的代码来查找此输出-:
$input = `<p>-</p>`;
if($input == `<p>-</p>`):
return true;
else:
return false;
endif;
Run Code Online (Sandbox Code Playgroud)
有更好的想法吗?
一旦用户点击,我需要用一条线连接2个DIV.我以角度开发我的项目.谁能帮我?我真的需要解决方案.
请参阅我的代码段以获得更清晰的信息.
.padding-answer-line-mapping
{
padding-bottom:8px;
}
.answer-container
{
width:40px;
height:40px;
background-color:#ccc;
border:1px solid #ccc;
margin:2px;
float:left;
text-align:center;
padding-top:8px;
cursor:pointer;
position:relative;
}
.answer-container:hover, .answer-container:focus, .answer-container:active
{
background-color: #0076e9;
color: white;
border: 1px solid #0076e9;
}
.round-pointer-right
{
position: absolute;
background-color:#ccc;
cursor:pointer;
width:10px;
height:10px;
border-radius: 50%;
right:0px;
top:14px;
margin-right:-20px;
}
.round-pointer-left
{
position: absolute;
background-color:#ccc;
cursor:pointer;
width:10px;
height:10px;
border-radius: 50%;
left:0px;
top:14px;
margin-left:-20px;
}Run Code Online (Sandbox Code Playgroud)
<link href="http://code.ionicframework.com/1.3.1/css/ionic.css" rel="stylesheet"/>
Match the following items.
<div class="row padding-answer-line-mapping">
<div class="col answer-container">
One
<div class="round-pointer-right"></div>
</div>
<div …Run Code Online (Sandbox Code Playgroud)一旦用户点击DIV,我在2个DIV之间创建了2行.如果我想改变我的答案,现在我遇到了如何重置不需要的线路的问题.
您可能会看到我的当前代码供您参考:
var lastSelection;
// Add click listener for answer-container
function listenToClick() {
var rows = document.querySelectorAll('.row'),
row;
var cols, col;
for (row = 0; row < rows.length; row++) {
cols = rows[row].children;
for (col = 0; col < cols.length; col++) {
// Bind information about which answer is this,
// so we can prevent from connecting two answers on
// same column.
cols[col].addEventListener('click', selectAnswer.bind({
row: row,
col: col,
element: cols[col]
}));
}
}
}
// This is fired when …Run Code Online (Sandbox Code Playgroud)我想知道在调用库后是否可以使用别名,让我们说:
$this->load->library('email','em');
Run Code Online (Sandbox Code Playgroud)
我怎么能这样做?
我的要求:
在tr悬停时,tr将具有线性渐变背景,而不仅仅是平坦的背景颜色.
样品td在tr:
A | B | C | B | A
Run Code Online (Sandbox Code Playgroud)
哪里 A darker --> C lighter
的jsfiddle:
https://jsfiddle.net/g7o84j43/
代码我尝试过:
HTML:
<table border="1px" width="100%" cellpadding="0px" cellspacing="0px">
<tr style="text-align:center">
<td>A</td>
<td>B</td>
<td>C</td>
<td>B</td>
<td>A</td>
</tr>
<tr style="text-align:center">
<td>A</td>
<td>B</td>
<td>C</td>
<td>B</td>
<td>A</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
CSS:
tr:hover
{
background: -webkit-linear-gradient(left, rgba(255,0,0,0), rgba(255,0,0,1)); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(right, rgba(255,0,0,0), rgba(255,0,0,1)); /* For Opera 11.1 to 12.0 */
background: …Run Code Online (Sandbox Code Playgroud) 我为我的项目实现了DRAG和DROP Angularjs,以便将DIV从一个位置移动到另一个位置,以便让用户能够对项目进行分类.我只需要满足我的简单要求:
Step 1: User click at division (1)
Step 2: User click at division (2)
Run Code Online (Sandbox Code Playgroud)
将采取以下
步骤:一旦用户进入 步骤(2),Goose将移至STEP (2).如果用户再次点击Goose在STEP(2)那么它会回去STEP(1).
我怎么能这样做?
正如您可以看到我的预期输出:
我目前的代码到目前为止:
var myApp = angular.module('MyApp',['ngDraggable']).controller('MyCtrl',function($scope){
$scope.centerAnchor = true;
$scope.toggleCenterAnchor = function () {
$scope.centerAnchor = !$scope.centerAnchor
};
var onDraggableEvent = function (evt, data) {
console.log("128", "onDraggableEvent", evt, data);
};
$scope.$on('draggable:start', onDraggableEvent);
$scope.$on('draggable:end', onDraggableEvent);
$scope.droppedObjects0 = [{name:'Goose'},{name:'Rabbit'},{name:'Chick'},{name:'Cat'}];
$scope.droppedObjects1 = []; //Answer: Cat + Rabbit
$scope.droppedObjects2 = …Run Code Online (Sandbox Code Playgroud)